tmnchca

New Member
May 23, 2021
11
4
Hi. I was wondering you guys could help me.

I'm playing around with modding, trying to get familiar with the syntax. I thought the following code was pretty basic:

Code:
WHAT: all
WHERE: all
WHEN: 0-24
WHO: none
OTHER: none

 SceneStart()

"Test statement"
0:: "Yes"
1:: "No"
2:: "Maybe"   

If 0
    "You have selected choice 1"
Elseif 1
    "You have selected choice 2"
Elseif 2
    "You have selected choice 3"
Endif       

SceneEnd()

When I load the game, enable my module, and force the scene to run (via the console), it runs. The only problem is the conditional statement doesn't work. The "Test Statement" pops up, and the selection menu comes up, as expected. But, no matter what option I select, it runs through each quoted statement as though the If statement isn't even there. All 3 choices are displayed one after the other.

Is there something special I have to do in order to enable conditional logic in my mod?
 

Ravenger6660

Active Member
Sep 14, 2017
852
996
Hi. I was wondering you guys could help me.

I'm playing around with modding, trying to get familiar with the syntax. I thought the following code was pretty basic:

Code:
WHAT: all
WHERE: all
WHEN: 0-24
WHO: none
OTHER: none

SceneStart()

"Test statement"
0:: "Yes"
1:: "No"
2:: "Maybe"  

If 0
    "You have selected choice 1"
Elseif 1
    "You have selected choice 2"
Elseif 2
    "You have selected choice 3"
Endif      

SceneEnd()

When I load the game, enable my module, and force the scene to run (via the console), it runs. The only problem is the conditional statement doesn't work. The "Test Statement" pops up, and the selection menu comes up, as expected. But, no matter what option I select, it runs through each quoted statement as though the If statement isn't even there. All 3 choices are displayed one after the other.

Is there something special I have to do in order to enable conditional logic in my mod?
Look like it should work.

Spacing most likely. All of the data needs to be lined-up in columns

I use Notepad++ because you can select Edit -> Blank Operations -> TAB to Space

You could also Change "Elseif 2" to just "Else"
 

hero357159

New Member
Apr 14, 2021
9
14
First guess would be the formatting. Tabs are not supported, you'll want to use a text editor that supports substituting spaces when you press the tab key.

If you use get Notepad++ you can also run this from the menu, save it, and then see if that works.
Edit -> Blank Operations -> TAB to Space (this is a one-time conversion, so you would need to keep doing it)

If that was the problem, you can set it up to automatically substitute 4 spaces per TAB under

Settings -> Preferences -> Language -> change TAB Size to 4 and check "Replace by space"
 

Vinfamy

creating moddable 3D life simulator
Game Developer
Jul 5, 2017
1,250
4,852
Kinks of the Month for June (v4.2 & v4.3)
please vote before 3 June
- Main Poll for All Patrons:
- Bonus Poll for $3+ Patrons:


(Immediately before this post, I just posted the Kink of the Month polls for June too, so if you're a patron, don't miss them)
This is the final of the five updates making up the v4.0 Variety and Polish Overhaul
- Another smaller but more selective batch of new male and female clothing items, focusing on uniforms, ceremonial / religious attire, and accessories. Basically, for Beta 3 & Beta 4, I simply went down the list of assets I have collected, so most of what's been added are just everyday clothes. In v4.0 Stable, I'll review what's still missing and seek out the specific pieces that the game still needs for its different building types, jobs, scenes and ethnicities. Also, I deliberately avoided jewellery and other accessories in Beta 3 & 4 because they must be rigged, morph-transfered and tagged a bit differently from normal clothes, so I leave them for v4.0 Stable to do all in one go for efficiency.
- Add all the logic to use all the new clothes for NPCs (which piece should go with which to avoid clipping, what to wear for which location, etc) will come in v4.0 Stable.
- Remove all the old clothes (which clip a lot) from the game files, along with some other assets no longer used, making sure to remove any references to these in the game code as to avoid crashes. This is to save space and keep the game's download size down. Obviously, during this overhaul, over 900 new clothes have been added so even with this clearing out of old assets, the final download size of v4.0 Stable will still be significantly higher than the v3.x versions, but still, it should be a couple hundreds mb smaller than the last update v4.0 Beta 4.
- A new slider in the Morphs section to "Counteract Vagina Deform". As you know, the vagina starts to deform if you use tons of morphs when creating your character, this has been minimized a lot in the Beta 1 update, but not 100% resolved. This new slider will do the trick for even the most heavily morphed character, so this should put this long-standing issue to rest finally. Special thanks to Mossrock for testing and helping me come up with this solution.
- Some improvements and refinements to the NPC randomization logic based on the community's feedback so far
- Checkbox next to each line in the Esc > NPC Distribution & Beauty Standards to completely exclude a certain body type / face preset from any new NPCs being generated from then on under any circumstances. For players wanting a world where absolutely everyone is hot perhaps.
- Bug fixes, stability improvements and performance optimizations. This update is called "v4.0 Stable" after all!
Estimated Release Date: Saturday, 29 May
 

tmnchca

New Member
May 23, 2021
11
4
hero357159 and Ravenger6660, that was it. Thank you.

For my second question, and idea why the passTime(12, 24) function wouldn't work?

There isn't much code to paste here. It just doesn't pass time whenever I use it. Seems to work in other existing scenes I've examined.
 
  • Like
Reactions: GNFNNVCN

tmnchca

New Member
May 23, 2021
11
4
Vinfamy, I just recently discovered LifePlay. You have really built something amazing here. Not just as an "adult" application, but a framework with enormous potential. Congratulations. Well done.
 
  • Like
Reactions: GNFNNVCN

Ravenger6660

Active Member
Sep 14, 2017
852
996
hero357159 and Ravenger6660, that was it. Thank you.

For my second question, and idea why the passTime(12, 24) function wouldn't work?

There isn't much code to paste here. It just doesn't pass time whenever I use it. Seems to work in other existing scenes I've examined.
Found [LifePlay_4_0_Beta_4_64bit\Docs\Modding\Command_Functions]
///////
passTime(hours_min, hours_max)

USE:
Use to pass time during a scene.

TYPE: Command, Non-Ref
RETURNS: /
THEME: Time
COMPARE:

EXAMPLE:
While TimePassed < 3
__"The party continues ..."
__passTime(0.25, 1)
Endwhile
"The party ends."
//////////
I don't use passTime very often unless it is needed for a scene.
It works like Random(min, max)
Time jump can sometime go unnoticed.

How are you triggering it?
Is it by an Interaction?

Example:
ACTION_UNIQUEID: Force_time_pass
ACTION_NAME: Hours pass
WHERE: home
WHEN: 0 - 24
MINUTES: 1 - 5
TIMEOUT_MINUTES: 0
ALSO_TIMEOUT:
EFFECTS:
CONDITIONS:
MOVE_FIRST: true
SCENE_ALWAYS: Time_pass_scene <----- {Make sure name matches scene}
ANIMATION:
WHO:
 

tmnchca

New Member
May 23, 2021
11
4
Ravenger6660

Yeah. I saw the example in the docs. One thing I don't understand about it is the TimePassed variable that is used as a condition of the while loop is never defined or incremented in this example. Is this a system or pre-defined variable?

The scene I'm testing now is triggered by circumstance (actually by console for testing). I assigned it to be triggered by an action, but the same problem. According to the clock, the time/date is the same after the scene as it is before.

I noticed back in this thread that passTime() got removed at one point. I wonder if it got reintroduced or if it is vestigial.
 

tmnchca

New Member
May 23, 2021
11
4
Just a suggestion: Right now the clothing system appears to be pretty binary. Either the player is wearing clothes or they are naked. I would suggest making nudity an integer. When the NPC is naked, it is at 100. But each article of clothing has a cover up factor that reduces the nudity level by a certain amount. So underwear would reduce the nudity value by less than a full dress/suit. This system would open up a world of possibilities for scenes to respond to how scandalous an npc is dressed. You could even have separate values for torso, legs and feet. So, for example, a scene could respond to a female walking around topless.

Adding stats to the player in a mod seems fairly trivial, but there may be some work involved in adding a "coverup" value to each clothing item. I haven't quite figured out how to modify the attributes of clothing items yet. Since you are messing around with clothing in the upcoming version anyway, it may be the ideal time to add a mechanic like this to the game.
 
Last edited:
  • Like
Reactions: ThatCrew

Ravenger6660

Active Member
Sep 14, 2017
852
996
Just a suggestion: Right now the clothing system appears to be pretty binary. Either the player is wearing clothes or they are naked. I would suggest making nudity an integer. When the NPC is naked, it is at 100. But each article of clothing has a cover up factor that reduces the nudity level by a certain amount. So underwear would reduce the nudity value by less than a full dress/suit. This system would open up a world of possibilities for scenes to respond to how scandalous an npc is dressed. You could even have separate values for torso, legs and feet. So, for example, a scene could respond to a female walking around topless.

Adding stats to the player in a mod seems fairly trivial, but there may be some work involved in adding a "coverup" value to each clothing item. I haven't quite figured out how to modify the attributes of clothing items yet. Since you are messing around with clothing in the upcoming version anyway, it may be the ideal time to add a mechanic like this to the game.
Some scene can check what is being covered.
[!Player.isVisible(Bottom) && !Player.isVisible(Bottom_Under)] Checks to see if you are bottomless.

[!Player.isVisible(Top) && !Player.isVisible(Top_Under) && !Player.isMale()] Checks to see if your female/futa is topless.

But no means to check if it is clothing see through or leave little to the imagination.

Some clothing does have "partial undress" but not sure how it will be applied yet.

I have a "Nudity Matters" mod.
https://f95zone.to/threads/lifeplay-v4-0-beta-4-vinfamy.11321/post-4138623

Original/old mod by Dbcaf
https://f95zone.to/threads/lifeplay-v4-0-beta-4-vinfamy.11321/post-3016638
 
Last edited:

tmnchca

New Member
May 23, 2021
11
4
Is there any way to open the clothes selection menu during a scene, except for a date/companion instead of the player? Or is the only way to dress a companion through the dress() functions?
 

tmnchca

New Member
May 23, 2021
11
4
Try with loadPreset() or openMenu(Inventory)
This only works on the player, not on the companion.

Is there a way to have clothing persist after a scene ends? It seems like on a scene close, the clothing is randomized again based on the location
 

Deleted member 2476484

Member
Modder
Jun 15, 2020
164
117
Yeah, openMenu(Inventory) is for Player.
But, Actor.loadPreset(hourglass_F) is supposed to works
I didn't try but sometime you need to reset by doing this:
Actor.loadPreset()
Actor.loadPreset(hourglass_F)
 
3.30 star(s) 118 Votes