Jump to content


Romance Specific coding questions


  • Please log in to reply
116 replies to this topic

#41 Kismet

Kismet

    Mild Thang

  • Member
  • 348 posts

Posted 13 February 2004 - 06:56 PM

Please be patient with me and my simple (stupid) questions.

The "Gabber" is replaced with the name of my NPC, correct?

When it checks for another romance to have reached the committed state, is it sufficient to put AnotherMaleRomanceActive, or do I need to put AnomenRomanceActive, SolaufeinRomanceActive, EdwinRomanceActive, etc.?

You can call your variables whatever you want, as long as the variable name is unique. It is a good idea for the variable name give some indication of what it's tracking however.

You have to check each romance separately. Not every romance will use the variable NAMERomanceActive, however. You'll have to check the various scripts (or ask the mod authors) for the actualy variable.

Or do I put this?
OR(3)
Race(Player1,HUMAN)
Race(Player1,HALF_ELF)
Race(Player1,ELF)


You'd use this one.

Also, what does RESPONSE #100 mean? I have seen it a lot, but I do not know what it means.  Do I need to put RESPONSE #100?  Or does that change according to various things I have named in my scripts?

Thank you!
Sillara
P.S. dorotea, if you would rather I PM you these questions, just let me know.

RESPONSE #100 indicates the actions following will happen. You can equate it to 100%, although that's not entirely accurate either since you can have several RESPONSE #num that do not have to add up to 100.

I hightly suggest reading SimDing0's scripting guide. http://tutorials.tea...pting/index.htm

#42 dorotea

dorotea

    witch extraordinaire

  • Modder
  • 1927 posts

Posted 13 February 2004 - 09:35 PM

Kismet has already answered - and in much detail, but I can confirm it to make you feel reassured. :)


The "Gabber" is replaced with the name of my NPC, correct?


Yes indeed. Original in-game romances have variables AnomenMatch, ViconiaMatch, etc. However (as Kismet already answered) if you make a variable
MatchMyBeloved or WillHeLoveMe it will work as well. :P Just be consistent and remember what you named each variable.

When it checks for another romance to have reached the committed state, is it sufficient to put AnotherMaleRomanceActive, or do I need to put AnomenRomanceActive, SolaufeinRomanceActive, EdwinRomanceActive, etc.?


In case with Anomen, Kelsey and Edwin it will be indeed xxxRomanceActive (where xxx stands for a name) but in case with Soulafein it is a bit more complicated, as his romance is 'unique' and you will need to check for:

Global("SolaTalk","GLOBAL",10) I think...

OR(3)
Race(Player1,HUMAN)
Race(Player1,HALF_ELF)
Race(Player1,ELF)


after operator OR() you need to put the number of conditions to be checked in the brackets - in this case '3'

Also, what does RESPONSE #100 mean? I have seen it a lot, but I do not know what it means. Do I need to put RESPONSE #100? Or does that change according to various things I have named in my scripts?


As Kismet already answered RESPONSE #100 means that the actions after that line will happen with 100% probability - ie 'always'. In some cases you can see scripts with RESPONSE #50 or even RESPONSE #25 - for example random spawns at rest in dangerous areas, or spells workig or not.

You definitely do not want to use it in a romance - unless you like unpleasant surprises! ;)


Here is a link to more scripting tutorials.

http://tutorials.tea...e9da4012c6d748a

Best of all is to email me - at ladydorotea@hotmail.com

But if you want an answer quickly - you might post it here, as surely there are much more experienced coders visiting here than in almost any other place, and I can be a bit sloppy with responding.

Freedom cannot be equated with goodness, virtue, or perfection. Freedom has its own unique self-contained nature; freedom is freedom ? not universal goodness. Any confusion or deliberate equalization of freedom with goodness and excellence is in itself negation of freedom, and acceptance of the path of restraint and enforcement.

Nikolai Berdyaev - Christian Existentialist, Philosopher of Freedom.


The Longer Road mod
Redemption mod
Bitter Grey Ashes


#43 Sillara

Sillara

    He made me love him without looking at me.

  • Member
  • 537 posts

Posted 13 February 2004 - 10:32 PM

Thank you, Kismet and dorotea! This thread is wonderful! :wub:

And now for another question. It is not (at least I hope not!) so involved as to require a PM.

Where do I put these Globals? In which file? Or does that come later when I put everything together in a tp2? Or am I just confused? :blink:

Sillara
Check out my RPG forum!

#44 Kismet

Kismet

    Mild Thang

  • Member
  • 348 posts

Posted 14 February 2004 - 04:29 AM

Thank you, Kismet and dorotea!  This thread is wonderful!  :wub:

And now for another question.  It is not (at least I hope not!) so involved as to require a PM.

Where do I put these Globals?  In which file?  Or does that come later when I put everything together in a tp2?  Or am I just confused?  :blink:

Sillara

Where they go depends on what you're doing. They can either go into a script or into a dialog.

The IF THEN RESPONSE #100 END is script coding however.

Seriously, if you're planning on coding this mod yourself, I strongly, strongly urge you to look at mods already out there with good coding (Kelsey-TOB is a good example). I also urge you to de-compile and look at the BioWare files and see how they're put together. Anomen's SOA files are banomen.dlg, anomenj.dlg, anomen.dlg, anomend.bcs and anomen.bcs. Not that people won't answer you questions, because we will, but if you want to understand what you're doing piecing together what you remember happening in game and they scripts/dialog is a good way to go about it.

#45 Melkor

Melkor

    He Who Lurks

  • Member
  • 105 posts

Posted 14 February 2004 - 04:58 AM

Best thing is to decompile dialogues like she mentioned, and creature scripts, print them then sit back and read them over. Read them over some more. Read them before bed its the best way for me to memorize things. It may look complex and hard at first but its rather easy after practice, practice and more practice.
Chosen of Mystra Mod Forums Home to great BG and IWD mods
The Frozen North Forums IWD, NWN, KotOR discussion

#46 Sillara

Sillara

    He made me love him without looking at me.

  • Member
  • 537 posts

Posted 14 February 2004 - 05:02 AM

Yes, we (meaning my husband! :wub: ) will be coding this mod ourselves. So--how do I de-compile the game scripts to look at Anomen's romance? I am quite familiar with that romance, so I suspect it would be the best for me to see. I have the most idea of what is happening in the game as I look at the codes. The question is--how do I get to see the codes? I am sure this is the most basic thing ever, but I have no idea how to do it. <_<

Please help!

Thanks!

Sillara
Check out my RPG forum!

#47 Kismet

Kismet

    Mild Thang

  • Member
  • 348 posts

Posted 14 February 2004 - 05:06 AM

Yes, we (meaning my husband!  :wub: ) will be coding this mod ourselves.  So--how do I de-compile the game scripts to look at Anomen's romance?  I am quite familiar with that romance, so I suspect it would be the best for me to see.  I have the most idea of what is happening in the game as I look at the codes.  The question is--how do I get to see the codes?  I am sure this is the most basic thing ever, but I have no idea how to do it.  <_<

Please help!

Thanks!

Sillara

Assuming you're doing this mod in WeiDU, and you should really, (and WeiDU has a good readme with tutorials and examples) you would just use (for example): weidu anomenj.dlg

You would do this command from the DOS prompt in your BG2 main directory. When it decompiles you'll have anomenj.d in your bg2 main directory.

edit: You're also going to want to look at the raw code from a mod or two because how dialogs decompile are not necessarily how they are put together.

#48 Grim Squeaker

Grim Squeaker

    Fallen

  • Member
  • 1018 posts

Posted 14 February 2004 - 05:06 AM

Yes, we (meaning my husband!  :wub: ) will be coding this mod ourselves.  So--how do I de-compile the game scripts to look at Anomen's romance?  I am quite familiar with that romance, so I suspect it would be the best for me to see.  I have the most idea of what is happening in the game as I look at the codes.  The question is--how do I get to see the codes?  I am sure this is the most basic thing ever, but I have no idea how to do it.  <_<

Well for scripts it's quite easy. You could extract the file and decompile it like a dialogue. But you can actually just look at them using Near Infinity (Here).
"You alone can make my song take flight..."

#49 Sillara

Sillara

    He made me love him without looking at me.

  • Member
  • 537 posts

Posted 14 February 2004 - 05:09 AM

Yes, we intend to use WeiDu. I will give it a try, and when I fail, I will come back asking for more help! :rolleyes:

Sillara
Check out my RPG forum!

#50 Melkor

Melkor

    He Who Lurks

  • Member
  • 105 posts

Posted 14 February 2004 - 05:11 AM

Use Weidu. Its DOS based so you will have to do some typing. An example would be for my computer, it varies where you have the BG2 directory at.
C:\Program Files\Black Isle\BGII - SoA\weidu baerie.dlg
this will bring up Aerie's banter dialogue (D format which you can open with Notepad or Wordpad) in your BG2 directory.
Chosen of Mystra Mod Forums Home to great BG and IWD mods
The Frozen North Forums IWD, NWN, KotOR discussion

#51 Sillara

Sillara

    He made me love him without looking at me.

  • Member
  • 537 posts

Posted 14 February 2004 - 05:24 AM

Well, I'm back. :o Where do I type that? I do not really know how to access the DOS on my computer. (Please don't laugh. :unsure: I really am that ignorant of computers.)

Thanks!
Sillara
Check out my RPG forum!

#52 Kismet

Kismet

    Mild Thang

  • Member
  • 348 posts

Posted 14 February 2004 - 05:29 AM

http://www.shsforums...y;threadid=2887

This tutorial assumes you have WinXP or Win2000/NT

#53 Sillara

Sillara

    He made me love him without looking at me.

  • Member
  • 537 posts

Posted 14 February 2004 - 05:38 AM

I do have WinXP. Thank you!

Sillara

P.S. I love this thread! :wub:
Check out my RPG forum!

#54 Sillara

Sillara

    He made me love him without looking at me.

  • Member
  • 537 posts

Posted 15 February 2004 - 10:48 PM

And now for another question! :rolleyes: How do I code a flirt pack-type thing? I do not know how to code up the force-talk part. I assume that the rest is just like a banter with random responses, but how do I get the flirt-pack force-talk part to happen?

Also, umm, where do I PUT the flirt-pack? Does it go in the B file? the J? Some other mysterious file? <_<

Thanks!

Sillara
Check out my RPG forum!

#55 Kismet

Kismet

    Mild Thang

  • Member
  • 348 posts

Posted 16 February 2004 - 05:16 AM

And now for another question!  :rolleyes:  How do I code a flirt pack-type thing?  I do not know how to code up the force-talk part.  I assume that the rest is just like a banter with random responses, but how do I get the flirt-pack force-talk part to happen?

Also, umm, where do I PUT the flirt-pack?  Does it go in the B file?  the J?  Some other mysterious file?  <_<

Thanks!

Sillara

*Kismet points back to her example on page 1.

#56 Rastor

Rastor

    Yes, I really am a dragon. Yes, I am a jerk. Live with it.

  • Member
  • 2001 posts

Posted 16 February 2004 - 01:56 PM

Sillara, Domi, let me know if this helps you: http://www.personal....ce_tutorial.zip
Home of Kitanya, Improved Asylum, more...

Posted Image

#57 -Ashara-

-Ashara-
  • Guest

Posted 16 February 2004 - 04:21 PM

Thank you, Rastor, it is very neatly done. I will re-vive this thread though for sure once I start coding though ;)

#58 Sillara

Sillara

    He made me love him without looking at me.

  • Member
  • 537 posts

Posted 16 February 2004 - 07:45 PM

What do you mean "revive"? I have so many questions that despite the excellent tutorial (Thank you, Rastor!!!! :) ) this thread will not die until my NPC is out of beta! ;)

Sillara
Check out my RPG forum!

#59 Sillara

Sillara

    He made me love him without looking at me.

  • Member
  • 537 posts

Posted 17 February 2004 - 01:34 AM

What did I tell you? Here I am again with another question. :rolleyes:

What is the code or command or what-have-you to make sure my Lovetalk is triggered in a specific area, say outdoors, or at a specific time, say night.

I have read earlier in this thread about rest-triggered dialogues, of which I have several, but I need this, too. :unsure:

Thank you!
Sillara
Check out my RPG forum!

#60 Kismet

Kismet

    Mild Thang

  • Member
  • 348 posts

Posted 17 February 2004 - 04:24 AM

What did I tell you? Here I am again with another question. :rolleyes:

What is the code or command or what-have-you to make sure my Lovetalk is triggered in a specific area, say outdoors, or at a specific time, say night.

I have read earlier in this thread about rest-triggered dialogues, of which I have several, but I need this, too. :unsure:

Thank you!
Sillara

AreaCheck()
AreaType()
Time()
Timoday()

IESDP is your friend: http://dragonlance.t...esdp/index.html