Jump to content


Photo

To link form a new file to another new file


  • Please log in to reply
67 replies to this topic

#1 Deathsangel

Deathsangel

    Living on Wings of Dreams

  • Modder
  • 3089 posts

Posted 20 January 2006 - 12:05 PM

IF ~~ THEN BEGIN HUNT_9
SAY ~Well, I am here to bring her to justice. It is crystal clear that the crimes she committed were great atrocities. I, by accident, may not have spoken to all she has harmed, and you could not blame me considering the amount of grief she sowed, but I have spoken to most. She is now worth quite a fortune and thus I will not let anyone stand in my way of taking her in.~
=
~Would you be willing to 'part' with her on a non-violent basis, I could part with... let us say 3000 gold. Call it a 'finders-fee' or whatever you wish, I do not care. What say you?~
  IF ~~ THEN REPLY ~I don't care enough for Ariena or for you to be even remotely interested. All I like is a good fight. So, shall we get on with it?~ GOTO HUNT_11
  IF ~~ THEN REPLY ~Do you really think I would sell such a good ally? I think not. Come and get her!~ GOTO HUNT_11
  IF ~CheckStatGT(Player,CHR,12)~ THEN REPLY ~Can we negotiate about the price?~ EXTERN ARIENAJ ReaBohu2
  IF ~CheckStatLT(Player,CHR,13)~ THEN REPLY ~Can we negotiate about the price?~ EXTERN ARIENAJ ReaBohu3
  IF ~~ THEN REPLY ~3000 gold? Sold!~ GOTO HUNT_6~
END

I wonder if the EXTERN's are okay? Or if it should be EXTERN ARIENAJ 13 if it is the 14th textblock

Still modding the Mod for the Wicked... It is a big project you know... And I got sidetracked (several times) a bit... sorry.
However, as we all know, Evil never really sleeps.


Sentences marking (my) life:

Winds of change... Endure them, and in Enduring grow Stronger
It takes a fool to look for logic in a man's heart
Never question the sanity of the insane
The Harmony of Life is Chaos
Living on Wings of Dreams



(1st march 2009) SHS women over me:
Kat: if there were more guys that looked like you out here, people's offspring wouldnt be so damn ugly
Noctalys: you are adorable :P

~~ I love it, and I am humbled! Yay! ~~


#2 Shed

Shed

    -Shed-

  • Modder
  • 2636 posts

Posted 20 January 2006 - 01:18 PM

What's your question, exactly?

#3 Rabain

Rabain

    God

  • Member
  • 653 posts

Posted 20 January 2006 - 01:30 PM

So long as ReaBohu2 is the correct statelabel in the ARIENAJ file at time of install Weidu will take care of directing the EXTERN to the correct place.
A knight without armour in a savage land...

#4 Deathsangel

Deathsangel

    Living on Wings of Dreams

  • Modder
  • 3089 posts

Posted 20 January 2006 - 01:36 PM

From ArienaJ (just to make the check Rabain)

IF ~Global("Arrecbohu2","GLOBAL",0) Global("Arcombatbohu","GLOBAL",2)~ THEN BEGIN ReaBohu2
SAY ~WHAT? You wants to sell Ariena?~ [Ariena53]
IF ~~ THEN DO ~SetGlobal("Arrecbohu2","GLOBAL",1)~ EXTERN BOHUNL HUNT_4
END

Furthermore I have the question how do check how many potions I gave to someone? I gave a creature potn52 (potion of extra healing), but I can't figure ou either in NI, IE or DLTCEP to check if I gave 5 potions or 2. Kind of like to know how I can change that number in any of these 3 programs. Thanks in advance.

Still modding the Mod for the Wicked... It is a big project you know... And I got sidetracked (several times) a bit... sorry.
However, as we all know, Evil never really sleeps.


Sentences marking (my) life:

Winds of change... Endure them, and in Enduring grow Stronger
It takes a fool to look for logic in a man's heart
Never question the sanity of the insane
The Harmony of Life is Chaos
Living on Wings of Dreams



(1st march 2009) SHS women over me:
Kat: if there were more guys that looked like you out here, people's offspring wouldnt be so damn ugly
Noctalys: you are adorable :P

~~ I love it, and I am humbled! Yay! ~~


#5 Rabain

Rabain

    God

  • Member
  • 653 posts

Posted 20 January 2006 - 02:21 PM

Looks okay though I don't see the need for the Global check in ReaBohu2 because if the PC's chr is greater than 12 then the dialog is going to try to go there regardless of whether the globals are set or not.


I would move the globals to the other dialog so that they are together with the Checkstat:

IF ~CheckStatGT(Player,CHR,12) Global("Arrecbohu2","GLOBAL",0) Global("Arcombatbohu","GLOBAL",2)~ THEN REPLY ~Can we negotiate about the price?~ EXTERN ARIENAJ ReaBohu2

This way if one of the two globals don't match then the dialog option for ReaBohu2 won't appear at all. Where you have them now they will have no impact if one is not set correctly.
A knight without armour in a savage land...

#6 Deathsangel

Deathsangel

    Living on Wings of Dreams

  • Modder
  • 3089 posts

Posted 21 January 2006 - 02:45 AM

Global("Arcombatbohu","GLOBAL",2) is set in the beginning of the dialog. Actually to 3, so I just discovered a mistake. I just didn't want the other part in ArienaJ to just go of. So I believe I need a global check, which is Global("Arcombatbohu","GLOBAL",3) cause that is set by the bohunl.d file which directs at ArienaJ. If I would have set OR(2) it would check either that global or the Global("Arrecbohu2","GLOBAL",0) and thus it would have set off. I don't think it otherwise will, but thanks for your help.

Still modding the Mod for the Wicked... It is a big project you know... And I got sidetracked (several times) a bit... sorry.
However, as we all know, Evil never really sleeps.


Sentences marking (my) life:

Winds of change... Endure them, and in Enduring grow Stronger
It takes a fool to look for logic in a man's heart
Never question the sanity of the insane
The Harmony of Life is Chaos
Living on Wings of Dreams



(1st march 2009) SHS women over me:
Kat: if there were more guys that looked like you out here, people's offspring wouldnt be so damn ugly
Noctalys: you are adorable :P

~~ I love it, and I am humbled! Yay! ~~


#7 jastey

jastey
  • Staff
  • 2029 posts

Posted 21 January 2006 - 03:00 AM

Furthermore I have the question how do check how many potions I gave to someone? I gave a creature potn52 (potion of extra healing), but I can't figure ou either in NI, IE or DLTCEP to check if I gave 5 potions or 2. Kind of like to know how I can change that number in any of these 3 programs. Thanks in advance.

I don't understand the question: Do you want to be able to check in-game the number of transferred potions? Then maybe a running script counting the number of potions in the characters inventory could do the trick:

NumItems(S:ResRef*,O:Object*,I:Num*) : Returns true only if the specified object has the number of items in the 3rd parameter of the type specified in the 1st parameter in its inventory. (IESDP)

NumItemsGT(S:ResRef*,O:Object*,I:Num*)

NumItemsLT(S:ResRef*,O:Object*,I:Num*)

Edited by jastey, 21 January 2006 - 03:01 AM.


#8 Deathsangel

Deathsangel

    Living on Wings of Dreams

  • Modder
  • 3089 posts

Posted 22 January 2006 - 07:01 AM


Furthermore I have the question how do check how many potions I gave to someone? I gave a creature potn52 (potion of extra healing), but I can't figure ou either in NI, IE or DLTCEP to check if I gave 5 potions or 2. Kind of like to know how I can change that number in any of these 3 programs. Thanks in advance.

I don't understand the question: Do you want to be able to check in-game the number of transferred potions? Then maybe a running script counting the number of potions in the characters inventory could do the trick:

NumItems(S:ResRef*,O:Object*,I:Num*) : Returns true only if the specified object has the number of items in the 3rd parameter of the type specified in the 1st parameter in its inventory. (IESDP)

NumItemsGT(S:ResRef*,O:Object*,I:Num*)

NumItemsLT(S:ResRef*,O:Object*,I:Num*)


Not in-game, just when I'm creating a creature. I use DLTCEP to assign the potion to the quickslot, but I don't know how many he automatically assigns and how I can change the number...

Still modding the Mod for the Wicked... It is a big project you know... And I got sidetracked (several times) a bit... sorry.
However, as we all know, Evil never really sleeps.


Sentences marking (my) life:

Winds of change... Endure them, and in Enduring grow Stronger
It takes a fool to look for logic in a man's heart
Never question the sanity of the insane
The Harmony of Life is Chaos
Living on Wings of Dreams



(1st march 2009) SHS women over me:
Kat: if there were more guys that looked like you out here, people's offspring wouldnt be so damn ugly
Noctalys: you are adorable :P

~~ I love it, and I am humbled! Yay! ~~


#9 Deathsangel

Deathsangel

    Living on Wings of Dreams

  • Modder
  • 3089 posts

Posted 23 January 2006 - 10:55 AM

New question:

I want to do something with the Cleric of Ilmater in the slums district (AR0408). However, he is exactly same as the one in the Waukeen promenade (AR0708). Now a little adaptation to him isn't bad, but how can I replace the cleric I will make with the original? I reckon via APPEND_BOTTOM with the script. I mean I know how to create a new character in an area, but how do I replace one? As it needs to use almost the same files (do not wish to delete dialogue, maybe add some). So summary how do I replace someone making him unique for the game, but keeping the rest almost intact? Hope I can make myself a bit clear.

Still modding the Mod for the Wicked... It is a big project you know... And I got sidetracked (several times) a bit... sorry.
However, as we all know, Evil never really sleeps.


Sentences marking (my) life:

Winds of change... Endure them, and in Enduring grow Stronger
It takes a fool to look for logic in a man's heart
Never question the sanity of the insane
The Harmony of Life is Chaos
Living on Wings of Dreams



(1st march 2009) SHS women over me:
Kat: if there were more guys that looked like you out here, people's offspring wouldnt be so damn ugly
Noctalys: you are adorable :P

~~ I love it, and I am humbled! Yay! ~~


#10 jastey

jastey
  • Staff
  • 2029 posts

Posted 24 January 2006 - 01:00 PM

With DLTCEP I don't know how to give a special number of items, sorry.

Your other problem: I would run an area script where the cleric got destroyed, replacing him with a similar creature from your mod having an own dialogue file. You could COPY_EXISTING the cleric, assigning an own death variable and dialogue via WeiDu in the tpa, for example.

Another thought I had: Maybe you could just append the in-game's cleric dialogue with some more options that are triggered by an area check. Assuming the clerics never leave their temple this should only trigger for the right cleric, making the replacement unnecessary (which would be more compatibility friendly, in case a different mod uses the in-game cleric for something).

#11 Shed

Shed

    -Shed-

  • Modder
  • 2636 posts

Posted 24 January 2006 - 02:06 PM

Number of items is the first of the "charges" numbers in DLTCEP.

#12 Deathsangel

Deathsangel

    Living on Wings of Dreams

  • Modder
  • 3089 posts

Posted 25 January 2006 - 02:22 AM

I will check out that function in DLTCEP Shed, thanks. Will probably be friday I can try it though...

Jastey, thanks for you answers but I really need a seperate deathvariable as... well... he needs to be killed. With your second suggestion you could kill the one in the Waukeen promenade and walk in the slums on and the script would start off for he would be killed... To destroy someone via script... don't you then see him die in game? That is not the idea? Is it possible to replace the entire script by putting a likewise named file in the override containing some changes... or would that be like appending? COPY_EXISTING I am unfamiliar with I look it up in IESDP on friday as well.

Thanks for all your time

Edited by Deathsangel, 25 January 2006 - 02:22 AM.

Still modding the Mod for the Wicked... It is a big project you know... And I got sidetracked (several times) a bit... sorry.
However, as we all know, Evil never really sleeps.


Sentences marking (my) life:

Winds of change... Endure them, and in Enduring grow Stronger
It takes a fool to look for logic in a man's heart
Never question the sanity of the insane
The Harmony of Life is Chaos
Living on Wings of Dreams



(1st march 2009) SHS women over me:
Kat: if there were more guys that looked like you out here, people's offspring wouldnt be so damn ugly
Noctalys: you are adorable :P

~~ I love it, and I am humbled! Yay! ~~


#13 Shed

Shed

    -Shed-

  • Modder
  • 2636 posts

Posted 25 January 2006 - 05:02 AM

COPY_EXISTING is a WeiDU tp2 command that makes a copy of a file you specify. During this process, you can patch it to change certain parts, for example the death variable.

COPY_EXISTING ~foozle.CRE~ ~override/dfoozle.CRE~
WRITE_ASCII 0x280 ~dfoozle~ //DV


#14 SConrad

SConrad

    I swear to drunk I'm not God

  • Administrator
  • 11144 posts

Posted 25 January 2006 - 10:19 AM

You can even use:

WRITE_ASCII DEATHVAR ~foo~

So that you won't need to specify a hex offset. ;)

Personal: vonconrad.com. Work: Envato.

Posted Image Khadion NPC mod - Team leader, head designer
Posted Image Hubelpot NPC mod - Team leader, coder
Posted Image NPC Damage - Coder
Posted Image PC Soundsets - Coder, voice actor
Posted Image Brythe NPC mod - Designer
Posted Image DragonLance TC - Glory of Istar - Designer
Posted Image The NPC Interaction Expansion Project - Writer for Cernd, Sarevok
Posted Image The Jerry Zinger Show - Producer

Iron Modder 5 - Winner


#15 jastey

jastey
  • Staff
  • 2029 posts

Posted 25 January 2006 - 11:49 AM

Deathsangel: Sorry, I thought you only wanted to add some dialogue. I think including an area check in the script(s) could work though, depending on what you planned, as these clerics indeed never leave their temple.

#16 Deathsangel

Deathsangel

    Living on Wings of Dreams

  • Modder
  • 3089 posts

Posted 28 January 2006 - 02:33 PM

Okay so I am busy on this quest (first time quest coding) and found some trouble again:

Question 1: It appears that for some reason this area does not have a script, though according to NI and IE there is one assigned to it I can not open it. It is area 0408. How can I now delete the cleric in that area and create an exact copy only with a tiny bit of extra dialogue (and maybe a bit more defense) and different death variable. I mean I know how to create a new create and I can use SLISMAT (= the cleric) as template keeping the same dialog file, but euh... I still need to add a creation for this new creature in an area script (I don't know how to it differently) and I need to be able to change that script to get the original cleric out of there...

Question 2:
I have a question about a command. In IESDP there stands: AddJournalEntry(53214,QUEST) the number pointing to the dialog.tlk, but how do I add text when creating a new one? I don't use seperate .tra and .dlg files. I leave that to weidu to traify them, so with my technique would it be like this:
AddJournalEntry("Creating a Cyric Temple","I have agreed to get an innocent little girl for Dolf, the Cyric cleric in the Slums district, in order to desecrate the altar that formally belonged to Lathander.",QUEST)

I don't think it is right, but I don't know how to seperate the title and the real text.

Still modding the Mod for the Wicked... It is a big project you know... And I got sidetracked (several times) a bit... sorry.
However, as we all know, Evil never really sleeps.


Sentences marking (my) life:

Winds of change... Endure them, and in Enduring grow Stronger
It takes a fool to look for logic in a man's heart
Never question the sanity of the insane
The Harmony of Life is Chaos
Living on Wings of Dreams



(1st march 2009) SHS women over me:
Kat: if there were more guys that looked like you out here, people's offspring wouldnt be so damn ugly
Noctalys: you are adorable :P

~~ I love it, and I am humbled! Yay! ~~


#17 SConrad

SConrad

    I swear to drunk I'm not God

  • Administrator
  • 11144 posts

Posted 28 January 2006 - 04:37 PM

Question 1: It appears that for some reason this area does not have a script, though according to NI and IE there is one assigned to it I can not open it. It is area 0408. How can I now delete the cleric in that area and create an exact copy only with a tiny bit of extra dialogue (and maybe a bit more defense) and different death variable. I mean I know how to create a new create and I can use SLISMAT (= the cleric) as template keeping the same dialog file, but euh... I still need to add a creation for this new creature in an area script (I don't know how to it differently) and I need to be able to change that script to get the original cleric out of there...

Why not patch the cleric that's already there instead of replacing him with a new one?

Question 2:
I have a question about a command. In IESDP there stands: AddJournalEntry(53214,QUEST) the number pointing to the dialog.tlk, but how do I add text when creating a new one? I don't use seperate .tra and .dlg files. I leave that to weidu to traify them, so with my technique would it be like this:
AddJournalEntry("Creating a Cyric Temple","I have agreed to get an innocent little girl for Dolf, the Cyric cleric in the Slums district, in order to desecrate the altar that formally belonged to Lathander.",QUEST)

I don't think it is right, but I don't know how to seperate the title and the real text.

UNSOLVED_JOURNAL ~Creating a Cyric Temple

I have agreed to get an innocent little girl for Dolf, the Cyric cleric in the Slums district, in order to desecrate the altar that formally belonged to Lathander.~
or

AddJournalEntry(~Creating a Cyric Temple

I have agreed to get an innocent little girl for Dolf, the Cyric cleric in the Slums district, in order to desecrate the altar that formally belonged to Lathander.~,QUEST)
More about journal entries here.

Personal: vonconrad.com. Work: Envato.

Posted Image Khadion NPC mod - Team leader, head designer
Posted Image Hubelpot NPC mod - Team leader, coder
Posted Image NPC Damage - Coder
Posted Image PC Soundsets - Coder, voice actor
Posted Image Brythe NPC mod - Designer
Posted Image DragonLance TC - Glory of Istar - Designer
Posted Image The NPC Interaction Expansion Project - Writer for Cernd, Sarevok
Posted Image The Jerry Zinger Show - Producer

Iron Modder 5 - Winner


#18 Deathsangel

Deathsangel

    Living on Wings of Dreams

  • Modder
  • 3089 posts

Posted 29 January 2006 - 02:56 AM

Question 1: It appears that for some reason this area does not have a script, though according to NI and IE there is one assigned to it I can not open it. It is area 0408. How can I now delete the cleric in that area and create an exact copy only with a tiny bit of extra dialogue (and maybe a bit more defense) and different death variable. I mean I know how to create a new create and I can use SLISMAT (= the cleric) as template keeping the same dialog file, but euh... I still need to add a creation for this new creature in an area script (I don't know how to it differently) and I need to be able to change that script to get the original cleric out of there...

Why not patch the cleric that's already there instead of replacing him with a new one?


Well there are two exactly the same clerics. The cleric of Lathander in the slums and Waukeen's Promenade are exactly the same. I did get me the following idea: I can add dialog with the first sentence having area check for the slums so it cannot be triggered in Waukeen's promenade. However, I'm just yet unfamiliar on how to seperate them, but apparently I can do that via COPY_EXISTING and then I change the deathvariable. Am I am still wondering though how the game should know that this same creature but with new deathvariable should be spawned in the slums district and not at both places or at Waukeen's promenade, if I know that I think I got it. Thus, summarizing:

COPY_EXISTING ~SLISMAT.CRE~ ~override/DSLISMAT.CRE~
WRITE_ASCII DEATHVAR ~DSLISMAT~ //DV
....... // some code to make sure DSLISMAT replaces only SLISMAT in the slums

Question 2:
I have a question about a command. In IESDP there stands: AddJournalEntry(53214,QUEST) the number pointing to the dialog.tlk, but how do I add text when creating a new one? I don't use seperate .tra and .dlg files. I leave that to weidu to traify them, so with my technique would it be like this:
AddJournalEntry("Creating a Cyric Temple","I have agreed to get an innocent little girl for Dolf, the Cyric cleric in the Slums district, in order to desecrate the altar that formally belonged to Lathander.",QUEST)

I don't think it is right, but I don't know how to seperate the title and the real text.

UNSOLVED_JOURNAL ~Creating a Cyric Temple

I have agreed to get an innocent little girl for Dolf, the Cyric cleric in the Slums district, in order to desecrate the altar that formally belonged to Lathander.~
or

AddJournalEntry(~Creating a Cyric Temple

I have agreed to get an innocent little girl for Dolf, the Cyric cleric in the Slums district, in order to desecrate the altar that formally belonged to Lathander.~,QUEST)
More about journal entries here.


thanks, though according to the link it should be

IF ~~ THEN DO ~AddJournalEntry(%Creating a Cyric Temple

I have agreed to get an innocent little girl for Dolf, the Cyric cleric in the Slums district, in order to desecrate the altar that formally belonged to Lathander.%,QUEST)~

instead of
IF ~~ THEN DO ~AddJournalEntry(~Creating a Cyric Temple

I have agreed to get an innocent little girl for Dolf, the Cyric cleric in the Slums district, in order to desecrate the altar that formally belonged to Lathander.~,QUEST)~

like you seem to suggest

Edited by Deathsangel, 29 January 2006 - 03:07 AM.

Still modding the Mod for the Wicked... It is a big project you know... And I got sidetracked (several times) a bit... sorry.
However, as we all know, Evil never really sleeps.


Sentences marking (my) life:

Winds of change... Endure them, and in Enduring grow Stronger
It takes a fool to look for logic in a man's heart
Never question the sanity of the insane
The Harmony of Life is Chaos
Living on Wings of Dreams



(1st march 2009) SHS women over me:
Kat: if there were more guys that looked like you out here, people's offspring wouldnt be so damn ugly
Noctalys: you are adorable :P

~~ I love it, and I am humbled! Yay! ~~


#19 SConrad

SConrad

    I swear to drunk I'm not God

  • Administrator
  • 11144 posts

Posted 29 January 2006 - 03:39 AM

Well there are two exactly the same clerics. The cleric of Lathander in the slums and Waukeen's Promenade are exactly the same. I did get me the following idea: I can add dialog with the first sentence having area check for the slums so it cannot be triggered in Waukeen's promenade. However, I'm just yet unfamiliar on how to seperate them, but apparently I can do that via COPY_EXISTING and then I change the deathvariable. Am I am still wondering though how the game should know that this same creature but with new deathvariable should be spawned in the slums district and not at both places or at Waukeen's promenade, if I know that I think I got it. Thus, summarizing:

COPY_EXISTING ~SLISMAT.CRE~ ~override/DSLISMAT.CRE~
WRITE_ASCII DEATHVAR ~DSLISMAT~ //DV
....... // some code to make sure DSLISMAT replaces only SLISMAT in the slums

Then patch the .are-file or the script, depending on where the creature is spawned from. *shrugs*

thanks, though according to the link it should be

IF ~~ THEN DO ~AddJournalEntry(%Creating a Cyric Temple

I have agreed to get an innocent little girl for Dolf, the Cyric cleric in the Slums district, in order to desecrate the altar that formally belonged to Lathander.%,QUEST)~

instead of
IF ~~ THEN DO ~AddJournalEntry(~Creating a Cyric Temple

I have agreed to get an innocent little girl for Dolf, the Cyric cleric in the Slums district, in order to desecrate the altar that formally belonged to Lathander.~,QUEST)~

like you seem to suggest

It depends on where you want to use it. If you read again, you'll see that Grim uses the same syntax I did for AddJournalEntry().

UNSOLVED_JOURNAL is still the best way, though.

Personal: vonconrad.com. Work: Envato.

Posted Image Khadion NPC mod - Team leader, head designer
Posted Image Hubelpot NPC mod - Team leader, coder
Posted Image NPC Damage - Coder
Posted Image PC Soundsets - Coder, voice actor
Posted Image Brythe NPC mod - Designer
Posted Image DragonLance TC - Glory of Istar - Designer
Posted Image The NPC Interaction Expansion Project - Writer for Cernd, Sarevok
Posted Image The Jerry Zinger Show - Producer

Iron Modder 5 - Winner


#20 jastey

jastey
  • Staff
  • 2029 posts

Posted 29 January 2006 - 03:44 AM

thanks, though according to the link it should be

IF ~~ THEN DO ~AddJournalEntry(%Creating a Cyric Temple

I have agreed to get an innocent little girl for Dolf, the Cyric cleric in the Slums district, in order to desecrate the altar that formally belonged to Lathander.%,QUEST)~

instead of
IF ~~ THEN DO ~AddJournalEntry(~Creating a Cyric Temple

I have agreed to get an innocent little girl for Dolf, the Cyric cleric in the Slums district, in order to desecrate the altar that formally belonged to Lathander.~,QUEST)~

like you seem to suggest


You should use the % inside the action, otherwise WeiDu compilation will fail due to too many tildas. But I'd use JOURNAL_UNSOLVED anyway.

However, I'm just yet unfamiliar on how to seperate them, but apparently I can do that via COPY_EXISTING and then I change the deathvariable.

I still don't get why you have to replace one of the clerics, if you know how to add "area specific" dialogue. Sorry for my pestering, but replacing an existing creature is never favourable in connection to mod compatibility.

Edited by jastey, 29 January 2006 - 03:49 AM.