Jump to content

WEIDU - items basic coding problems


ptifab

Recommended Posts

Hi,

 

i'm editing the properties of some items, using WEIDU, but when i look at the documentation, there's no parameters to the damage type in the opcode (12).

for example : with a bow, the first ability effect is ranged opcode 2, then inside it there's some damage effect opcode 12 (like adding 1D2 magic damage). When i try to edit this effect, there's no parameter to alter the type of damage (acid, magic, etc.)

My code :   

Quote

LPF ADD_ITEM_EFFECT INT_VAR header = 1 type = 2 opcode = 12 target = 2 timing = 1 parameter1 = 0 parameter2 = 0 power = 6 resist_dispel = 1 dicenumber = 1 dicesize = 2    END //add 1D2 magic damage inside ranged Item ability 0

Do i have to modify it using another method ? or is there a special parameter i cannot see ?

Edited by ptifab
Link to comment

Hi again, instead of creating a new topic i'm editing this one.

so, when i am trying to clone an effect and get a match by resource to select wich header to clone, i have no results so far, so i must missing something. Here's my code

 

Quote

    LPF CLONE_EFFECT INT_VAR header = 0 header_type = 1 match_opcode = 206 STR_VAR match_resource = ~DVWEB2~ resource = ~SPID134~ insert = ~BELOW~ END

i have checked in NI everything is spelled ok, but i have the impression that the code doesn't read the resource, so it can't clone and replace the resource with the new one. Am i doing something wrong ?

Link to comment

Thank you for your answer but this has not changed anything. Maybe i've not explained it correctly.

 

I am looking to clone a specific effect with opcode 206 in a list of 5+ of them, so to isolate the one i want to clone, i try to specify the resource to get a match, but so far with my code i have no results. Changing the syntax as you recommended Jarno didn't changed anything. Maybe my code has an error ? Do i have to specify something for the resource (like extension .itm, .wav, etc.) ?

 

Edit : my bad i'm blind, i was not on the correct header level, so that could'nt work, sometime you need to go to sleep before looking correctly on things. Thanks for your time ;)

Edited by ptifab
Link to comment
On 10/3/2019 at 2:02 AM, Jarno Mikkola said:

There's no ~'s in the resources. The numbers don't come with it, so why do the strings come with them.

This is true for LPF's... not your own functions.

This is bad advice.  There's nothing wrong with using tildes as string delimiters when supplying STR_VAR parameters.  They work the same way there as they do in other places.

Link to comment

Thanks a lot !

Is there a tuto that explains me this kind of coding because i'm kind of realising i'm a big newbie in that weidu coding world... The WEIDU readme is really entertaining and i've red other's tp2 to learn more, but i feel sometime that i lack some basics in hex coding and read/write stuff.

Link to comment

I would like to copy the strref from an item to apply it to a newly created spell. I've read a lot about strref, but i'm struggling at how keeping it into a variable to copy from a file to one another. Do i have to copy the strref from the first file into a global  ?  or an exterior file (like ini) ? 

Link to comment

Join the conversation

You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...