Post reply

Warning: this topic has not been posted in for at least 120 days.
Unless you're sure you want to reply, please consider starting a new topic.
Name:
Email:
Subject:
Message icon:

Verification:
Type the letters shown in the picture
Listen to the letters / Request another image

Type the letters shown in the picture:
What color is grass?:
What is the seventh word in this sentence?:
What is five minus two (use the full word)?:

shortcuts: hit alt+s to submit/post or alt+p to preview


Topic Summary

Posted by: the bigg
« on: December 16, 2005, 04:26:27 AM »

Would the sword even get copied, with B_O_I_I_C in there?  Or does WeiDU consider the INNER_ACTION of another item getting patched a change?  Or does it run the INNER_ACTION, and then not bother copying the sword because it hasn't changed, but the I_A still gets run?
B_O_I_I_C means that the sword item doesn't get copied because it isn't changed (to be precise, Weidu saves a copy of the loaded file and confronts it with the result of all patches).
Also,
Code: [Select]
COPY_EXISTING ~kit.ids~ ~override~
  INNER_ACTION BEGIN
  APPEND ~kit.ids~ ~a_string~
  END
the relevant part is the outer one, except in the one case that the outer part has B_O_I_I_C and the file didn't change, in which case the relevant part is the inner one.

in this example, the APPEND is not saved to the file.

BTW, I coded OUTER_FOR as an action containing actions, so this discussion is a bit moot  :)
Posted by: Ghreyfain
« on: December 15, 2005, 02:59:59 PM »

Would the sword even get copied, with B_O_I_I_C in there?  Or does WeiDU consider the INNER_ACTION of another item getting patched a change?  Or does it run the INNER_ACTION, and then not bother copying the sword because it hasn't changed, but the I_A still gets run?
Posted by: the bigg
« on: December 15, 2005, 01:11:17 PM »

Interesting.  I suppose you might be right.  Though no actual changes are made to the template...  Anyway, thank you for the advice.
Since people will learn how to program while doing mods (I sure did), it's advisable to pick up on how many good habits is possible: for example, assuming that erroneous file changes might happen, so redirect them to a dummy file or whatever. (of course, making sure that no file changes happen would be better, but that isn't so easy in a 100,000 something project like it is in a 4000 lines tp2  :)

Quote
In truth, my technique is useful in only a relatively small number of situations (usually kit components).  I thought I'd share just in case someone else needed just such a technique.
There are a number of situations where this would be useful apart from that example, such as creating a variable which is destined to appear in a file name, etc. (for an example, see the \n workaround http://dev.gibberlings3.net/index.php/Common_Code#Emulating_.5Cn_in_WeiDU here (note: requires g3 forum login).
Posted by: Wounded_Lion
« on: December 15, 2005, 01:03:15 PM »

Interesting.  I suppose you might be right.  Though no actual changes are made to the template...  Anyway, thank you for the advice.

In truth, my technique is useful in only a relatively small number of situations (usually kit components).  I thought I'd share just in case someone else needed just such a technique.

a W.L.

btw - I always visit PPG before G3.  So I hadn't seen your reply.   ;)
Posted by: the bigg
« on: December 15, 2005, 12:52:50 PM »

Can you link me to it?  I am not familiar with your post.
http://forums.gibberlings3.net/index.php?showtopic=5076&view=getnewpost, if you haven't seen it by now (it was a direct reply to your thread there)

Quote
Also, why copy the sword file instead of the item template?  It might save a *tiny* bit of space, I suppose.  But I know that my code works because I have tested it repeatedly.
Because when doing this you should always copy a file that is in no way related to ones you're dealing with (accidental changes in one part of the code might have bad effects on subsequent parts, and so on.
Posted by: Wounded_Lion
« on: December 15, 2005, 12:44:38 PM »

Can you link me to it?  I am not familiar with your post.  Nevermind.   ;)

Also, why copy the sword file instead of the item template?  It might save a *tiny* bit of space, I suppose.  I know that my code works because I have tested it repeatedly.

a W.L.

*edited*
Posted by: the bigg
« on: December 15, 2005, 06:29:34 AM »

As I have just pointed out on G3, I can code OUTER_FOR, OUTER_SET, OUTER_SPRINT and OUTER_PATCH[_SAVE] for these types of needs.

And, if you want to keep to your workaround, you'd better use
COPY_EXISTING ~sw1h01.itm~ ~override~
  DO_YOUR_STUFF
BUT_ONLY_IF_IT_CHANGES
Posted by: Wounded_Lion
« on: December 14, 2005, 09:06:30 PM »

For a private, for-fun Nymph kit (that will not have a public release), I designed an innate ability called "Kiss of Death".  The ability creates a magical weapon that causes 4 damage per level of the Nymph with a save vs. breath for half.  I didn't want to create 40 items manually or by 40 seperate patch commands (call me lazy... or efficient  8) ).  I wanted to use a FOR loop to create the items for me.  But... WeiDU will not allow a FOR or WHILE loop outside of a patch-type command.  So... I created this workaround (which saves time and decreases tp2 size):

Quote

COPY ~Nymph/WLKISSD.ITM~ ~override/WLKISSD.ITM~
 FOR ( index = 1 ; index < 41 ; index = index + 1 ) BEGIN
  INNER_ACTION BEGIN
   COPY ~Nymph/WLKISSD.ITM~ ~override/WLKISS%index%.ITM~
    SAY NAME2 @3
    WRITE_LONG 0xAE ("%index%" * 2)
    WRITE_LONG 0xDE ("%index%" * 2)
  END // INNER_ACTION
 END // FOR


The first copy command is meaningless:  it simply copies the item template into the override directory.

Skilled modders can figure out the rest without a lengthy explanation from me.

Do I get bonus points from Japeth for finding a way to use INNER_ACTION BEGIN in my mod? ;D

a Wounded Lion