Author Topic: Scripts  (Read 13359 times)

0 Members and 1 Guest are viewing this topic.

Offline SaintofLandD

  • Newbie
  • *
  • Posts: 5
« on: July 19, 2021, 10:50:24 AM »
Is there a way to make a TalkDetails script or something, the same way you can make a MeetGirl script? I've got it working for the house, but it doesn't seem to work in the brothel.

Also, sometimes when I add a choice box to a script, it doesn't work even though I checked it against existing choice boxes, why could that be? It'll open, but none of the choices work - either the script won't fire, or it closes and cycles through all the profile images.
« Last Edit: August 06, 2021, 10:30:22 PM by SaintofLandD »

Offline h1262216

  • Jr. Member
  • **
  • Posts: 85
Re: Scripts
« Reply #1 on: August 13, 2021, 09:31:25 AM »
There are plans to make this possible in the new version, but as of now I think it is not.
The new version is using lua scripts for scripting, and there is an xml file that specifies which lua function to call for which event. It looks like this
<Event Name="girl:interact.dungeon" Script="DefaultInteract.lua" Function="InteractDungeon" />
<Event Name="girl:interact.brothel" Script="DefaultInteract.lua" Function="InteractBrothel" />
<Event Name="" Script="Office.lua" Function="InteractOffice" />
<Event Name="girl:interact.private" Script="PrivateChambers.lua" Function="PrivateChambers" />
<Event Name="girl:interact.bedroom" Script="Bedroom.lua" Function="VisitBedroom" />
<Event Name="girl:chat.dungeon" Script="Chat.lua" Function="ChatDungeon" />
<Event Name="girl:chat.brothel" Script="Chat.lua" Function="ChatBrothel" />
<Event Name="girl:refuse" Script="DefaultInteract.lua" Function="Refuse" />
<Event Name="girl:mission" Script="Mission.lua" Function="GoOnMission" />
<Event Name="girl:quest" Script="Mission.lua" Function="Quest" />
<Event Name="girl:training" Script="Training.lua" Function="Training" />
This means that you could either override the entire interaction menu (by giving a custom `InteractBrothel` for example), or just one specific part of the interaction, e.g. `VisitBedroom`.
What is missing in the code still is the ability to load such a file for a specific girl. But I am planning on adding that. I had the feeling not many pack makers make use of custom scripts anyway, so I had this as low priority, but if there is interest I can try to implement it sooner.

Offline SaintofLandD

  • Newbie
  • *
  • Posts: 5
Re: Scripts
« Reply #2 on: August 15, 2021, 06:18:19 PM »
Don't worry about it if there isn't much demand, I can wait. I still need to figure out how to edit lua files anyway. I added a new option to the DefaultInteract script, but couldn't get it to work. It showed up in the choice box, but didn't work beyond that.