devolution

Author Topic: Madmonk's Script mod  (Read 10414 times)

0 Members and 2 Guests are viewing this topic.

Offline madmonkskillz

  • Newbie
  • *
  • Posts: 13
Madmonk's Script mod
« on: October 20, 2014, 03:01:23 AM »
So I love this game, but I wanted to add more into the dialogue. That's what got me started with the scripteditor. I'm still learning it, and I'm a horrible writer, but this is my first attempt at something like this and hope others can give me good input on it.

I suggest that those using this make a backup of their "DefaultInteractDetails.script" which is found in "resources\script\" folder. Place the rar file into your whoremaster folder and extract.

Currently working on DefaultInteractDetails.script. This is a complete WIP and I don't know when I'll be done. Just scripted the Rape event if the girl refuses. Main thing that effects this script is PC Fear stat and if the girl has the Virgin trait (not sure if the virgin status is enough.) Also in this version is a small change to Casual conversation which changes based on PC Fear stat.

Release (10/21/2014):
https://mega.co.nz/#!vpRDiICR!gV-jfs83WsunaaioEffXR9nZXezPcNA1sEH-q23twMo

Let me know what you guys think. I'll upload as I write more.
« Last Edit: October 21, 2014, 08:24:49 AM by madmonkskillz »

Offline aevojoey

  • Hero Member
  • *****
  • Posts: 1413
  • Thats ok, I'm used to disappointment.
Re: Custom character dialog scripts
« Reply #1 on: October 20, 2014, 05:27:52 AM »
So I was looking around at the scripts and especially the globaltriggers, and tried out making custom scripts for some of my girls. But I can't seem to get them to work. Is this function not implemented yet? Here's what I do
It is in there but there is a bug in it, or, there was a bug in it.
It was only allowing 1 trigger per girl.
I fixed it and it will be in .06.00.11

--triggers.xml, with the following lines <triggers><trigger type="talk" where="brothel" file="talkCD.script"/></triggers>. As far as I know this is correct. I checked it alongside the info found in the "\WhoreMaster\Resources\Scripts\GlobalTriggers.xml"
Most things are case sensitive so you will need to use:
Code: [Select]
<Triggers><Trigger Type="Talk" Where="Brothel" File="talkCD.script"/></Triggers>
Until .11, just use 1 trigger in the file
Fixing the game is a better game than actually playing it.
Get the Current Version <|> Discuss the Game <|> Report a bug

Offline madmonkskillz

  • Newbie
  • *
  • Posts: 13
Re: Custom character dialog scripts
« Reply #2 on: October 20, 2014, 05:52:43 AM »
awesome. I'll go try that out. How many triggers will be available after the update to .11?

EDIT: Ok, so I tried that out but it's still not working. Here's what else I tried:
-Double checked that the letter case was correct
-Made sure the meet.script line was gone
-Closed the game and reopened, and reloaded the save file
-Copied and pasted exactly what was posted in the quote
-Double checked that the talkCD.script actually said "Dialog (*TEST What would you like to do?*)"
-Tried changing "DefaultInteractDetails.script" dialog line to "Dialog (*TEST What would you like to do?*)" which works, but that doesn't help me customize dialog script. It did show me that a new game is not required to show changes in the scripting, though
-Renamed "Triggers.xml" to "triggers.xml" and back
-Renamed "talkCD.script" to "TalkCD.script" to "talkcd.script" to "Talk.script" to "talk.script" (and changed the line in the triggers.xml to correspond.)
-Removed the "<?xml version="1.0"?>" line from the triggers.xml and returned it after no change
« Last Edit: October 20, 2014, 06:11:44 AM by madmonkskillz »

Offline aevojoey

  • Hero Member
  • *****
  • Posts: 1413
  • Thats ok, I'm used to disappointment.
Re: Custom character dialog scripts
« Reply #3 on: October 20, 2014, 06:03:46 AM »
awesome. I'll go try that out. How many triggers will be available after the update to .11?
As many as you need, it is recursive like the girls themselves.
The order they get saved into the save game is the reverse order they are in the triggers.xml but that does not really matter.

The only problem at this point is that the triggers.xml is only loaded when the girl is first loaded into the game.
So only when you start a new game unless it is for a random girl in which case it is loaded when the rgirl is created by the game.
« Last Edit: October 20, 2014, 06:06:36 AM by aevojoey »
Fixing the game is a better game than actually playing it.
Get the Current Version <|> Discuss the Game <|> Report a bug

Offline madmonkskillz

  • Newbie
  • *
  • Posts: 13
Re: Custom character dialog scripts
« Reply #4 on: October 20, 2014, 06:24:42 AM »
Quote
The only problem at this point is that the triggers.xml is only loaded when the girl is first loaded into the game.

Okay, so that is where my problem lies. I also just tested it and now it works. Is that something that can be fixed in an update? also, if I remove a character from the "Characters" folder and load the game, will it unload the girl (if she is in my brothel already) or will it break the game in an attempt to find her data that is no longer there. And if that works, will saving the game without her data, putting her data back into the "Characters" folder, and reloading the game count as "loading" her as if she were loaded for the first time?

Offline CaptC

  • Sr. Member
  • ****
  • Posts: 395
  • Are you experienced?
Re: Custom character dialog scripts
« Reply #5 on: October 20, 2014, 09:26:12 AM »
It doesn't break the game if it doesn't find the data for the girl, because I believe it stores what it needs in the save file. What does happen, is that since the pictures aren't there anymore, you get broken link messages. This is strictly from my experience, not from code bopping, though.


You can edit the save game file and eliminate the girl's record if you want. Or whenever she appears, just don't hire her. Or if you do end up hiring her, fire her at the first opportunity.

Offline aevojoey

  • Hero Member
  • *****
  • Posts: 1413
  • Thats ok, I'm used to disappointment.
Re: Custom character dialog scripts
« Reply #6 on: October 20, 2014, 03:19:18 PM »
Okay, so that is where my problem lies. I also just tested it and now it works. Is that something that can be fixed in an update?
The coding part of it will be fixed in the next version of the game.

also, if I remove a character from the "Characters" folder and load the game, will it unload the girl (if she is in my brothel already) or will it break the game in an attempt to find her data that is no longer there. And if that works, will saving the game without her data, putting her data back into the "Characters" folder, and reloading the game count as "loading" her as if she were loaded for the first time?
If you delete the Characters folder, you will not get images for that girl (probably just default images) but the girl will not be unloaded.
You need to edit your save game and remove both the <Girl ...> section for that girl as well as the <File ...> from the top.
Code: [Select]
    <Loaded_Files>
        <Girls_Files>
            <File Filename="???.girlsx" />    <----- Just delete the line for the file you want to reload
        </Girls_Files>
    </Loaded_Files>
Doing it this way you do not have to delete any files.
The next time you load the game, it checks the <Loaded_Files> section and if it finds a file not in the list , it loads it.
Fixing the game is a better game than actually playing it.
Get the Current Version <|> Discuss the Game <|> Report a bug

Offline madmonkskillz

  • Newbie
  • *
  • Posts: 13
Re: Custom character dialog scripts
« Reply #7 on: October 21, 2014, 08:11:49 AM »
Okay, so from here on, I'm going to use this thread as my release thread as I work on my scripts. They'll be available for everyone interested. I'm currently working an overhaul on the current DefaultInteractDetails.script. I didn't really like how a lot of the default interactions were really short, so I'm going to edit them and give the game a little more story and immersion. Of course if you don't deal with interactions much, or like the interactions short (the way they are) then you can just ignore this mod.

I am neither a programmer, scriptwriter, or even just plain writer. I'm doing this because I enjoy whoremaster, but feel that I would like it better this way.

As I release new versions I hope people will try them out and get back with me with feed back.

Offline CaptC

  • Sr. Member
  • ****
  • Posts: 395
  • Are you experienced?
Re: Madmonk's Script mod
« Reply #8 on: October 22, 2014, 04:16:18 PM »
Hmmmm. I was doing something similar, see the CaptC script thread.


Perhaps we can divvy up the work. There's a TON to do.

Offline FlamBurger

  • Sr. Member
  • ****
  • Posts: 465
  • I need to stop lazing about so much.....
Re: Madmonk's Script mod
« Reply #9 on: October 27, 2014, 02:28:51 PM »
Yes, that will leave more time for character meet scripts when you guys are done with the default! 8)
The whole region of Crossgate will be my playground....
Our playground....
The whole freaking world guys....
Crossgate Chronicles?? Yup it's that bad....
I'll still chug on! Plus, The Crazy Team is really doing a good job on this game.
https://mega.nz/#F!A55jWSpT!P-1Lw1-kNxiBfelAH24Kvg My Packs

Offline Jacko

  • Jr. Member
  • **
  • Posts: 70
Re: Madmonk's Script mod
« Reply #10 on: December 02, 2014, 12:03:48 AM »
Hey,


I've also just started playing around with the script editor, and I've been adjusting values and modding some of the interactions, but I've run into a problem.


There is an Ifgirlhastrait[text] "trigger" (not familiar with the nomenclature) in the editor that doesnt seem to be working properly. I've successfully used other "triggers" like Ifgirlstat and  Ifgirlskill to make new dialogue in the game, and it works fine, so I'm pretty sure I've got a handle on the format of else, endif, etc. and they are working fine.


I'm trying to make sex dialogue based on Ifgirlhastrait[Virgin], but it doesn't seem to be firing. Because the traits have to be manually written, I'm not sure if I have the correct format. Is it "Virgin" or "virgin"? I suppose I could go test but I'd rather ask you guys with the experience first. Anyone else having problems with Ifgirlhastrait[text]?


The script editor is the answer to many of the different interactions with the girls I've been wanting. Thanks!

Offline aevojoey

  • Hero Member
  • *****
  • Posts: 1413
  • Thats ok, I'm used to disappointment.
Re: Madmonk's Script mod
« Reply #11 on: December 02, 2014, 08:34:16 PM »
I've also just started playing around with the script editor, and I've been adjusting values and modding some of the interactions, but I've run into a problem.

There is an Ifgirlhastrait[text] "trigger" (not familiar with the nomenclature) in the editor that doesnt seem to be working properly. I've successfully used other "triggers" like Ifgirlstat and  Ifgirlskill to make new dialogue in the game, and it works fine, so I'm pretty sure I've got a handle on the format of else, endif, etc. and they are working fine.

I'm trying to make sex dialogue based on Ifgirlhastrait[Virgin], but it doesn't seem to be firing. Because the traits have to be manually written, I'm not sure if I have the correct format. Is it "Virgin" or "virgin"? I suppose I could go test but I'd rather ask you guys with the experience first. Anyone else having problems with Ifgirlhastrait[text]?

The script editor is the answer to many of the different interactions with the girls I've been wanting. Thanks!
Capital V Virgin

The line in the code that is run when that script variable is run is:
Code: [Select]
    if(g_Girls.HasTrait(m_GirlTarget, Script->m_Entries[0].m_Text))
So when entering the text in the script, use only the trait name as it appears in the CoreTraits.traitsx file with no quotes.
If you enter it as "Virgin" in the editor, the code will run it as:
Code: [Select]
    if(g_Girls.HasTrait(m_GirlTarget, ""Virgin""))
The double quotes will cause the if statement to always return false.
Fixing the game is a better game than actually playing it.
Get the Current Version <|> Discuss the Game <|> Report a bug

Offline Jacko

  • Jr. Member
  • **
  • Posts: 70
Re: Madmonk's Script mod
« Reply #12 on: December 03, 2014, 06:19:26 AM »
Interesting. I have it capitalized with no quotes and it still never fires, I even have it as the first check in the "If" string (not sure if that matters, I'm assuming the script runs in order and checks each variable from top to bottom, if it fires it skips the rest until the Endif). Still trying to get straight on the format.

Offline madmonkskillz

  • Newbie
  • *
  • Posts: 13
Re: Madmonk's Script mod
« Reply #13 on: December 14, 2014, 11:37:50 AM »
Can a moderator close this thread please? I have given up this project after losing all my current work to a harddrive crash. All I have is my initial upload (which isn't much) and have no motivation to redo all the other text I already have. Maybe I'll go join CaptC at a later date when I stop feeling sorry for myself.

Offline aevojoey

  • Hero Member
  • *****
  • Posts: 1413
  • Thats ok, I'm used to disappointment.
Re: Madmonk's Script mod
« Reply #14 on: December 14, 2014, 04:02:27 PM »
Can a moderator close this thread please?
You can close the thread yourself by using the "Lock Topic" button at the bottom left of the thread page.


I have given up this project after losing all my current work to a harddrive crash. All I have is my initial upload (which isn't much) and have no motivation to redo all the other text I already have. Maybe I'll go join CaptC at a later date when I stop feeling sorry for myself.

If you have not done anything to overwrite your old hard drive, you can probably recover your lost files with a linux live disk.
As long as the hard drive still powers up, the data should still be accessible even if the operating system does not boot.
Linux has a tool called "testdisk", with that you can recover data even if the partition table is corrupt. It is also good to recover deleted files.

Go to http://www.linuxmint.com/download.php, download an iso and burn it to a dvd.
Read this - http://www.cgsecurity.org/wiki/TestDisk_Step_By_Step - to see how to use testdisk.

You could also run testdisk in windows but if a virus crashed your hard drive, connecting the disk to a windows computer may allow the virus to jump to your new hard drive. Linux has much less of a chance of allowing that.
Fixing the game is a better game than actually playing it.
Get the Current Version <|> Discuss the Game <|> Report a bug