Game Editing And Additions > User Mods

ScriptEditor needs an update

<< < (2/2)

aevojoey:
The GiveGirlInvItem gives the girl and item from your inventory so if you don't have one she will not get one.
GiveGirlInvItem should be used with IfPlayerHasItem
Use AddItemtoGirl to create an item from nothing and give it to her.

Poison does not do anything in the game at the moment and with each turn being 1 week, poisons having a duration does not make much sense.


New script commands for .06.03.00
"IfGirlStatus ~ is ~"

"SetGirlStatus ~ to ~"
- If used to end any type of pregnancy, this will end all types of pregnancy.
- If used to start a pregnancy, it will not work if she is already pregnant.

"EndPregnancy"
- Ends all pregnancies

"CreatePregnancy type ~ chance ~ force ~"
- force=true will end existing pregnancies, force=false will not create pregnancy if already pregnant

HuiBui:

--- Quote from: aevojoey on November 26, 2017, 10:23:15 AM ---The GiveGirlInvItem gives the girl and item from your inventory so if you don't have one she will not get one.
GiveGirlInvItem should be used with IfPlayerHasItem
Use AddItemtoGirl to create an item from nothing and give it to her.

--- End quote ---

It works. I cant believe. Thanks

GigaQuad85:
I can confirm that this all still works, to a point.
I added to some of the scripts already available in the game, to give the game some flare.  I added stories of fighting and also of erotic prowess, or just a basic adventure in text (would you like to throw the crystal orb?).  There are only so many items a girl can carry, only so many traits she can have at any one time.  This does give the game some balance even if it does limit some things.  Some girls come preprogrammed with traits, and using a script that adds to them could end up in overflow, never allowing the girl to acquire more traits, and only multiplying the ones she has already.


In case anybody hasn't noticed, you need to be very careful with the if---- commands in the script, but there are mechanisms that allow you to get creative.  I added a storyline that, based on equipment in my inventory, sent me on a journey with a particular girl, then provided her with equipment, and allowed that equipment to be acquired only one time per girl, as most of it was clothing or misc.  The way to do this was to create the ifgirlhasitem command, but leave the next command blank, and instead add an Else or Elsenew that was followed by the item acquirement.  There are two ways for the girls to acquire items, I tried both, but I found that using random rolls to put the items into my inventory first was a bit more balanced, and I only had to do the roll once to get an "Item acquirement Level", that way I could use the greater or equal quality in a string of singlecommand if statements that work from the top level downward.  I could then add these items to the girl later by testing if I had them in my inventory before trying to give them to her.  Since each set only gets given once, there's no buildup except of the new items.  Once they are acquired to differing levels of a complete set with the girl, I have a scripts with triggers that have a "weekly roll" that offer another aspect of the whole journey.  Some of them actually allow other scripts to be run, or offer items that activate other script features I've added to the different place to meet scripts.


What I haven't found out how to do yet is how to add a button to a place that allows a meetscript to be attached; I've checked the HTML\XML tags for the places, and I've attempted to make adjustments.  I've added my own button images, but when I run the game, even with new saves, the buttons do not show up.  If they have to be added in the CPP or python scripts, that may be out of my league, but if somebody could point me in the right direction, I'd be happy to try.


On another note, some people have also requested the ability to loop the meetscripts so that using a meeting script causes the meetscript to run again several times to get more chances at acquiring girls.  There are several ways to do this, and they vary by intent.  One way is to replace the AddTargetGirl with an add of a random girl to the dungeon.  I'd like to see this command have a counterpart of AddRandomGirlToBrothel, or AddRandomGirlTo with a place marker that allows you to send them to a particular area.  By using a roll variable and several quick if endif blocks you could have the girl sent to a random area, or you could have her sent to the area of the script.  However, I'm not great with code, and while I may soon attempt this adjustment, don't hold your breath on my account.  If somebody were to do this, I would be grateful.  By adding random girls, you get around the one girl limit, even though the script is attached to a particular girl (this is the way scripts work, and it should be that way in my opinion; it makes modifying the game more an act of creativity and playing the mods allows you to adjust by your intent).
This, of course, actually gives us a suggested path for another method of looping, from outside a script.  Using a pair of global variables and 3 scripts for each meeting place, you can continually loop until you have met your quota of attempts in any meeting place.  By setting global variables in the triggers list, you can check for them on meeting triggers.
you set global variable A to 100 for a maximum of 200 attempts
You have a script run at every week that resets a second global variable B to global variable A
You set up a second meetscript that matches the first, but you have it trigger based on global variable B, which will decrement every time this script runs, and when that variable reaches 0, the script will no longer run.  You add a choice in the both the old and dupelicate script that allows you to end the entirety by simply setting the global variable B to 0.  This will end the loop for this week.  The downside is that you will have to add all of this for each meeting place, which means a lot of dupelicated information.
I'm working on this method for the future; I've created a copy of my main game folder, and then instead of actual files for most of it, I used special symlinks, so I don't have to have so many copies of my data files that eat up a lot more space.  This has afforded me the ability to make only one extra folder for each of the areas I'm working on with the basic editors that came with the game.  I'm interested in viewing the main code of the game, but ultimately, I don't think I'll be much help there.  I might be able to devise a looping method that can be applied in the triggers to loop the meetscripts by a config-file variable, so you can set the maximum loop number for standard girl attempts.  It would also be great if you could create a random girl from the target girl the script is attached to, but that may take some adjustment.  It all depends on what the random girl script commands actually do.  If they select base-girls at random, this may only require a slight adjustment.  Instead of randomizing the basegirl, it could be used to grab a randomized copy of the target girl, or a new command could be added called AddTargetRandomGirl with some flags could be used to make a copy of the target girl, set a few particulars, and then send her to a desired location.  But again, that's a lot more coding than I'm yet prepared for.


To recap, you can loop in a script if you swap AddTargetGirl for adding a random girl or set of girls to your dungeon.  Since I also have special dungeon scripts, this is more help than hindrance.  I've also been writing scripts that let me shop to outfit her or to otherwise make her adept at different jobs by misc or consumables that adjust her values.  The original scripts worked really well, but lacked the ability to loop, so I added it by going with random girls at first.  Then I added a final chance at the target girl in the end of the script.  Once that was finished, I added more choices and storylines, allowing the whole script to loop from within.  I'd like to amend that further.  I'll be making my attempts using the game provided methods first, to see how it goes.  If it works, I'll keep it to that for a while.

h1262216:
I'm working on an update for WM and one of the big changes is that the scripting will be based on lua, so that there is a real scripting language and you can use whatever editor you like. The basics are working, but currently there are still a few things that the old scripts could do that are missing in my new code.
you can find the new scripts here:
https://github.com/h1262216/crazys-wm-mod/tree/master/Resources/Scripts

@GigaQuad85
as somebody who has apparently used the old scripting extensively, I'd be especially interested in your feedback, critique and suggestions.

GigaQuad85:

--- Quote from: h1262216 on November 29, 2020, 08:52:57 AM ---I'm working on an update for WM and one of the big changes is that the scripting will be based on lua, so that there is a real scripting language and you can use whatever editor you like. The basics are working, but currently there are still a few things that the old scripts could do that are missing in my new code.
you can find the new scripts here:
https://github.com/h1262216/crazys-wm-mod/tree/master/Resources/Scripts

@GigaQuad85
as somebody who has apparently used the old scripting extensively, I'd be especially interested in your feedback, critique and suggestions.

--- End quote ---
LUA huh?  I guess I'll have some learning to do.As long As I can translate the logic, it shouldn't be difficult.  I'd be happy to check out your work when it's ready.  I'm already looking at the scripts.

Navigation

[0] Message Index

[*] Previous page

Go to full version