Author Topic: Scripting question  (Read 10741 times)

0 Members and 1 Guest are viewing this topic.

Offline fg109

  • Newbie
  • *
  • Posts: 17
Scripting question
« on: October 20, 2009, 05:48:32 PM »
I just started messing around with the script editor for the first time today.  I managed to edit the TalkDetailsDefault.script so that I don't have to rape girls who are in love with the player.  But how do I insert new scripts to the game or make new script commands?

Sorry, I'm a complete beginner at programming, so if it's too complicated for me to understand you can tell me to give up on it.

EDIT: In case anyone wants the option to just have sex with girls in love with you instead of raping them, and is too lazy to make it themselves, I attached my edited file.  There's a bit of extra stuff on it, but it mostly works and shouldn't affect gameplay that much.

[attachment deleted by admin]
« Last Edit: October 21, 2009, 02:40:27 AM by fg109 »

Offline Tyrian

  • Newbie
  • *
  • Posts: 4
Re: Scripting question
« Reply #1 on: October 21, 2009, 09:24:32 AM »
I don't think you can add completely new scripts or script commands yet, but I think you could copy and edit Cammy White's MeetGirl.script and triggers.txt to give other girls something other than the default walk-in-town script. I haven't actually tried it, though.

Offline Solo761

  • Administrator
  • *****
  • Posts: 175
Re: Scripting question
« Reply #2 on: October 21, 2009, 10:22:53 AM »
Try with old manual, there is some info on scripts, as in where to put them, although command list is outdated

http://www.mediafire.com/file/bdijnzzj0zm/Editing Manual.pdf

As for new script commands, you can't add them, they need to be coded into game.

Offline fg109

  • Newbie
  • *
  • Posts: 17
Re: Scripting question
« Reply #3 on: October 22, 2009, 09:29:10 PM »
Thanks, that's exactly what I needed.  ;D

And sorry, didn't know that I'm not supposed to have attachments on my posts.

Offline Dagoth

  • Administrator
  • *****
  • Posts: 617
Re: Scripting question
« Reply #4 on: October 22, 2009, 09:34:01 PM »
And sorry, didn't know that I'm not supposed to have attachments on my posts.
Actually, the attachments were lost in the transfer from the other host along with uploaded avatars, sorry. I've disabled further attachments for now until my host upgrades the network connection on the server (which they've said they plan to do soon).

Offline necno

  • Core Developer
  • ******
  • Posts: 385
Re: Scripting question
« Reply #5 on: October 25, 2009, 05:26:53 PM »
Scripts are attached to triggers.
You can find txt files with the triggers and the old manual above will describe how to use them.
Click here to donate
After you do so please pm me the email address you used so I can add you to the donation forum.

Working on:
Whoremaster II (Official)
Birthright (Now a commercial rougelike)

Offline redle

  • Newbie
  • *
  • Posts: 14
Re: Scripting question
« Reply #6 on: December 13, 2009, 08:29:41 AM »
Several scripting questions...
1.  Should user generated scripts work in the current environment?  I seem to be having no luck (it would also seem that the example Cammy White script built into the distribution never runs either).

2.  There seem to be 2 types of scripts: those specifically associated with an existing female which effect only her and the player, and generic scripts which effect the player or can generate random stuff.  Is there a way for a generic (global) script to create the appearance of a specific female?  Can a specific female's script cause a change to a different female?

3. The pdf about scripting mentioned an exe that could take a text script and compile it.  Does this still exist, or is the script editor tool (which doesn't allow free typing) required?

Offline Solo761

  • Administrator
  • *****
  • Posts: 175
Re: Scripting question
« Reply #7 on: December 13, 2009, 08:39:18 AM »
There were some changes to some parts of scripting, from what I saw triggers are converted to XML and I don't know if the game still looks for triggers in old format.

Yes, there was an exe to compile them, unfortunately that got replaced with script editor tool.

Offline DocClox

  • Dev Team
  • *****
  • Posts: 1867
  • Messing Around With Python
Re: Scripting question
« Reply #8 on: December 13, 2009, 08:46:24 AM »
No, the old triggers format is discontinued.

Supporting both in parallel seemed risky, and I wasn't aware of anyone using the old format for anything.

Offline redle

  • Newbie
  • *
  • Posts: 14
Re: Scripting question
« Reply #9 on: December 13, 2009, 08:55:58 AM »
I'm new to the whole thing anyway, so it isn't like I have a lot to convert.  I'm just testing the waters.  I suppose the next question is where can I find information on the new xml trigger system.

(Edited addition) Point me to an example is probably enough...  Oh, and GlobalTriggers.txt does seem to still be used.  I was able to modify that and cause an existing global script to run based on a different trigger I put in place there.
« Last Edit: December 13, 2009, 09:36:21 AM by redle »

Offline DocClox

  • Dev Team
  • *****
  • Posts: 1867
  • Messing Around With Python
Re: Scripting question
« Reply #10 on: December 13, 2009, 09:44:23 AM »
I'm new to the whole thing anyway, so it isn't like I have a lot to convert.  I'm just testing the waters.  I suppose the next question is where can I find information on the new xml trigger system.

It seems I'm wrong. The mods to use GlobalTriggers.xml are in svn, but not in the last release.

The xml version has some detailed documentation in the comments, as well as a load of examples. I've attached the file that's going to be distributed, as well as the converted Cammy White trigger.


Offline delta224

  • Dev Team
  • *****
  • Posts: 577
Re: Scripting question
« Reply #11 on: December 13, 2009, 10:44:06 AM »
Actually the complier just got put on hold.  I have been working on it, it just other videogame took up my coding time.