Jump to content


Photo

Toss your semi-useful WeiDU macros here


51 replies to this topic

#31 CamDawg

CamDawg

    Seven billion ton robot monster

  • Gibberling Poobah
  • 9222 posts
  • Gender:Not Telling

Posted 26 July 2017 - 05:20 AM

As presently written, you can't specify a tra file for it. I'll poke it a bit and make it work.


I came here with a simple dream: a dream of killing all humans. And this is how it must end? Who's the real seven billion ton robot monster here? Not I. Not... I.


#32 Endurium

Endurium
  • Members
  • 5 posts
  • Gender:Not Telling

Posted 26 July 2017 - 10:57 AM

Just wanted to say thanks for these everyone. Gradually getting back into IE modding and want to sharpen my little-used WeiDU skills. :thumbsup:



#33 Miloch

Miloch

    Barbarian

  • Modders
  • 4782 posts
  • Gender:Male
  • Location:At Large

Posted 26 July 2017 - 06:17 PM

Out of curiosity, which of these are in the current WeiDU and which are not?

 

As for tossing my WeirDU macros here, I think you would think twice if you saw the "code"...


Infinity Engine Contributions
Aurora * BG1 NPC * BG1 Fixpack * Haiass * Infinity Animations * Level 1 NPCs * P5Tweaks
PnP Free Action * Thrown Hammers * Unique Containers * BG:EE * BGII:EE * IWD:EE
================================================================
Player & Modder Resources
BAM Batcher * Creature Lister * Creature Checker * Creature Fixer * Tutu/BGT Area Map & List * Tutu Mod List
================================================================
"The trouble with having an open mind, of course, is that people will insist on coming along and trying to put things in it." -Terry Pratchett

#34 CamDawg

CamDawg

    Seven billion ton robot monster

  • Gibberling Poobah
  • 9222 posts
  • Gender:Not Telling

Posted 26 July 2017 - 06:39 PM

None of them... I meant for the thread to be an island of misfit macros that aren't quite useful enough for inclusion in WeiDU itself.


I came here with a simple dream: a dream of killing all humans. And this is how it must end? Who's the real seven billion ton robot monster here? Not I. Not... I.


#35 K4thos

K4thos
  • Modders
  • 1057 posts
  • Gender:Male

Posted 04 August 2017 - 08:19 PM

Patch and action function that fixes missing column entries in 2da files.

https://github.com/K...issing_cols.tpa

 

Everything will be done automatically if used as:

LPF 2DA_MISSING_COLS END

Optionally following vars can be set:

INT_VAR
cols = minimum amount of columns that should have values (if not set function will automatically read max number of columns in file)
STR_VAR
2da = 2da file that should be patched, e.g. kitlist (not used in patch function)
entry = what entry should be set in missing columns (if not set function will automatically read default entry from loaded 2da, e.g. *)

Edited by K4thos, 04 August 2017 - 08:23 PM.


#36 Angel

Angel
  • Members
  • 114 posts
  • Gender:Not Telling
  • Location:Netherlands

Posted 07 August 2017 - 04:18 AM

Another small one, turn a creature into a summoned creature.  This sets the XP- and gold stats to zero, sets the flag to leave no corpse, sets affinity to "neutral", sets the creature's gender to "summoned" (or to the unlisted value 20 if Remove Summoning Cap from D0Tweaks is installed), and sets the unstealable and undroppable flags on all of the creature's items.
 
There is one parameter, power_level.  This should only be set if this creature will be used with opcode #127, it is used to determine how many instances of this creature will be summoned.  The number here will be written to 0x0018 in the creature file.  For more details of this, check the description of opcode #127 on IESDP, but basically the higher this number is, the fewer instances of this monster will be created.  Default is -1, which means no change.
 

Spoiler

 
Example of use, to make a summonable version of an ochre jelly:
 

COPY_EXISTING "jeloch01.cre" "override/jelochsu.cre"
  LAUNCH_PATCH_FUNCTION make_summon END

Edited by Angel, 01 September 2017 - 11:42 PM.


#37 Jarno Mikkola

Jarno Mikkola

    The Imp

  • Modders
  • 6201 posts
  • Gender:Male
  • Location:The town where the dead haven't keeled over, yet. In Finland.

Posted 07 August 2017 - 04:46 AM

Another small one, turn a creature into a summoned creature

Could you(or anyone that knows how to..) update that to include the limitless summon feature, so it can detect if that added gender exists and then set the gender to that instead in case it does.

Edited by Jarno Mikkola, 07 August 2017 - 04:54 AM.

Welcome to the sanity, you are free to search for the limit, it's out there, we drew it in the sand.
Here's how to install all the ... mods you ever really could want to Infinity Engine games. I removed the stable word from there as Roxanne began to add BS mods that are likely to break compatibility from the BWS.

#38 Angel

Angel
  • Members
  • 114 posts
  • Gender:Not Telling
  • Location:Netherlands

Posted 07 August 2017 - 04:58 AM

 

Another small one, turn a creature into a summoned creature

Could you update that to include the limitless summon feature, so it can detect if the added gender exists and then set the gender to that instead in case it does.

 

 

If you mean the one from d0tweak, it doesn't actually get added to gender.ids (something I intend to addres sometime).  The one from Tweaks Anthology does things differently and only works on EE games.

 

EDIT: Okay, done.


Edited by Angel, 07 August 2017 - 05:19 AM.


#39 Angel

Angel
  • Members
  • 114 posts
  • Gender:Not Telling
  • Location:Netherlands

Posted 07 August 2017 - 08:42 AM

Okay, this one is the result of my first, very careful prodding into the inner workings of Baldur's Gate Trilogy.  Unlike EET, BGT resets the chapter count and empties the journal on transition to BG2.  If you want your BG1 quest to do the same, this function can help you.

 

This function is called on a .dlg file, that is, a dialog that has already been compiled.  If called on a game that is not BGT, it will do exactly nothing.

 

But if the game is BGT, it will loop through the transitions defined in the dialog, extract all the journal entries, then edit aram00.bcs (the transition script BGT uses to get the party into BG2) and tack on EraseJournalEntry instructions for all the journal entries found.

 

Spoiler

 

An example of how it is used, from one of my own mods:

COMPILE "%MOD_FOLDER%/bg1/caths_peril/dialog/mh#cath.d"

LAUNCH_ACTION_FUNCTION erase_journal_entries_on_bg2_transition
  STR_VAR
  dialog        = "mh#cath"
END
 

Note, this is as yet untested (although I see no reason why it won't work) as my test game has not reached the point of transition to BG2 yet.  (Getting there, party is currently raiding Durlag's Tower.)  EDIT: It's no longer untested; it works!

 

The function will only work on compiled dialog files (.dlg) that already exist in the game.  It will not work on dialog files that haven't been compiled (.d).  Neither does it work on scripts, compiled (.bcs) or not (.baf).


Edited by Angel, 22 August 2017 - 10:48 AM.


#40 CamDawg

CamDawg

    Seven billion ton robot monster

  • Gibberling Poobah
  • 9222 posts
  • Gender:Not Telling

Posted 07 August 2017 - 10:24 AM

One suggestion for make_summon would be to add the undroppable flags to inventory items.


I came here with a simple dream: a dream of killing all humans. And this is how it must end? Who's the real seven billion ton robot monster here? Not I. Not... I.


#41 Angel

Angel
  • Members
  • 114 posts
  • Gender:Not Telling
  • Location:Netherlands

Posted 07 August 2017 - 10:41 AM

One suggestion for make_summon would be to add the undroppable flags to inventory items.

 

Good suggestion, will do!

 

EDIT: Done!


Edited by Angel, 07 August 2017 - 11:13 AM.


#42 Grammarsalad

Grammarsalad
  • Modders
  • 445 posts
  • Gender:Male

Posted 07 August 2017 - 11:59 AM

Another small one, turn a creature into a summoned creature.  This sets the XP- and gold stats to zero, sets the bit to leave no corpse, sets affinity to "neutral", and sets the creature's gender to "summoned".
 
There is one parameter, power_level.  This should only be set if this creature will be used with opcode #127, it is used to determine how many instances of this creature will be summoned.  The number here (default 1) will be written to 0x0018 in the creature file.
 

Spoiler

 
Example of use, to make a summonable version of an ochre jelly:
 
COPY_EXISTING "jeloch01.cre" "override/jelochsu.cre"
  LAUNCH_PATCH_FUNCTION make_summon END
Oh, this is great! Any chance for a 'shawdowed' option (i.e. like shades or shadow monsters in iwdee)?

Edited by Grammarsalad, 07 August 2017 - 12:02 PM.


#43 subtledoctor

subtledoctor
  • Modders
  • 2144 posts
  • Gender:Male

Posted 07 August 2017 - 12:30 PM

Another small one, turn a creature into a summoned creature. 


This is GOLD. Gonna make good use of this.

Anyone know of a macro that is the obverse of SNPRINT - instead of retaining the first x characters of a string, I want to remove the first x characters and keep the rest. (Basically I want to automate switching out the modder prefix for a different one.)

Faiths & Powers: Spell spheres and kit pack for priests and paladins
Might & Guile: Tweaks and kits for warriors and rogues
Scales of Balance: Game tweaks and rule overhauls
NPC_EE: More options for NPCs in BGEE, SoD, & BG2EE


#44 Jarno Mikkola

Jarno Mikkola

    The Imp

  • Modders
  • 6201 posts
  • Gender:Male
  • Location:The town where the dead haven't keeled over, yet. In Finland.

Posted 07 August 2017 - 12:36 PM

(Basically I want to automate switching out the modder prefix for a different one.)

REPLACE_TEXTUALLY ...
Welcome to the sanity, you are free to search for the limit, it's out there, we drew it in the sand.
Here's how to install all the ... mods you ever really could want to Infinity Engine games. I removed the stable word from there as Roxanne began to add BS mods that are likely to break compatibility from the BWS.

#45 subtledoctor

subtledoctor
  • Modders
  • 2144 posts
  • Gender:Male

Posted 07 August 2017 - 01:41 PM

 

(Basically I want to automate switching out the modder prefix for a different one.)

REPLACE_TEXTUALLY ...

 


Maybe I'm just not seeing how to do that. Maybe I'm not good with regexp (okay, I know I'm no good with regexp...)

Here's what I'm looking to do:

Spoiler


Edited by subtledoctor, 07 August 2017 - 02:04 PM.

Faiths & Powers: Spell spheres and kit pack for priests and paladins
Might & Guile: Tweaks and kits for warriors and rogues
Scales of Balance: Game tweaks and rule overhauls
NPC_EE: More options for NPCs in BGEE, SoD, & BG2EE




Reply to this topic



  


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users