5mithers

Member
Aug 3, 2019
405
436
206
ttyrke Going to heavily caveat the following "bug" report with: I muck with the code. I'm well aware I'm using the game outside the normal state of affairs.

Bug report:
Child gender is inverted when child is placed in guest house.

Details:
I modify the code to have only female gender babies.

JavaScript:
<<set _childGender = randomInteger(0,1)>>

# modified to:

<<set _childGender = randomInteger(0)>>

But even with that only being set to 0 (female), I get the following outcome:
Birth:
1720365522104.png

Guest:
1720352981355.png

I haven't tracked down where the inversion is happening.

*Edit: Going to test with my modification removed to see if it is truly inverting each time.

Results of 5 tests with modification:
girl -> boy
girl -> boy
girl -> boy
girl -> boy
girl -> boy

Results of 5 tests with clean index.html no modification:

boy -> boy
boy-> boy
boy-> boy
girl -> girl
girl -> girl


So not a bug with unmodified code. I'm still curious what is being introduced when it's only ever set to 0, not 0,1. But I'll chalk it up to "I shouldn't mess with the code" and that's fine. I'll continue to play around with it because this is a fun distraction from actual work.
 
Last edited:

Magnus Castor

Newbie
Jun 8, 2023
86
108
157
[...]
JavaScript:
<<set _childGender = randomInteger(0,1)>>

# modified to:

<<set _childGender = randomInteger(0)>>
[...]
randomInteger is a function that takes 2 arguments. Your randomInteger(0) should be written as randomInteger(0,0) or even better set _childGender = 0 since you only want girlies.

randomInteger(0) means randomInteger(0, undefined) which returns a undefined value. This is sometimes treated as 0 and sometimes as 1 which is why gender is changing. o_O :cool:
 
  • Like
Reactions: tgp31 and 5mithers

5mithers

Member
Aug 3, 2019
405
436
206
And this is why I'm not a dev. I can monkey with the code, but I don't truly know it. Thanks!

*Edit: Side note: I've been tweaking the code this way since.... 0.2x something. So far this is the first version where it hasn't always just returned 0. Guessing I was leaning on bad code functioning in a reliable way. lol
 

Magnus Castor

Newbie
Jun 8, 2023
86
108
157
Four degrees of code peeking...

I have some tips for tools if you want to peek at code for the game and perhaps change it. From worst tools to best.

Here is my three cents or something.


Worst: Peeking at the html-file directly.

A html-file can be hard to read. All the << ... >> :sick: etc.



Slightly better: Twine

Twine reads the html-file and shows the code divided into smaller sections called passsages. And a little easier for humans to read. You can edit the passages directly or copy/paste to your favorite editor.

After you are done save back to a html-file.

Bonus: You can use Twine to peek at many of the html-games around. Many of them are done in Twine/Sugarcube anyway.


But since ttyrke is a nice person he offer even better tools. The source code to the game is under github aka. version-control. The code is divided into several files and folders which makes it easier to change only small parts of it.

With a tool called TweeGo the source-code is put together into the html-file.


Somewhat in the middle: Download the source code as a zip-file and use tweego

You get your own copy of the source code. But then what? If you interested in the source you should go all the way. The full monte....


The best: Use github and tweego.

Even if you don't want to share your tweaks this is the best option.

Write your tweaks once! Combine the latest updates of the game with your own small tweaks.

See what is changed between differnt updates.

And if you want to share your amazing code with the world you are just a few clicks away ... :p
ttyrke might put your suggestions into the official game.


That's my thoughts for now. Enjoy the Apocalyptic world!
 

GamerDaddy

Engaged Member
Feb 6, 2023
2,749
1,689
296
Four degrees of code peeking...

I have some tips for tools if you want to peek at code for the game and perhaps change it. From worst tools to best.

Here is my three cents or something.


Worst: Peeking at the html-file directly.

A html-file can be hard to read. All the << ... >> :sick:etc.



Slightly better: Twine

Twine reads the html-file and shows the code divided into smaller sections called passsages. And a little easier for humans to read. You can edit the passages directly or copy/paste to your favorite editor.

After you are done save back to a html-file.

Bonus: You can use Twine to peek at many of the html-games around. Many of them are done in Twine/Sugarcube anyway.


But since ttyrke is a nice person he offer even better tools. The source code to the game is under github aka. version-control. The code is divided into several files and folders which makes it easier to change only small parts of it.

With a tool called TweeGo the source-code is put together into the html-file.


Somewhat in the middle: Download the source code as a zip-file and use tweego

You get your own copy of the source code. But then what? If you interested in the source you should go all the way. The full monte....


The best: Use github and tweego.

Even if you don't want to share your tweaks this is the best option.

Write your tweaks once! Combine the latest updates of the game with your own small tweaks.

See what is changed between differnt updates.

And if you want to share your amazing code with the world you are just a few clicks away ... :p
ttyrke might put your suggestions into the official game.


That's my thoughts for now. Enjoy the Apocalyptic world!
all i can manage to do is break the game
 

Klaabu

Member
Feb 19, 2019
156
86
196
Satellite mini event - only 6 first persons in quest house list get happiness +, if there is a child (age 0) in quest house, he/she can join and have opinion about it.

Sorry about my Engrish
 

5mithers

Member
Aug 3, 2019
405
436
206
....
Write your tweaks once! Combine the latest updates of the game with your own small tweaks.
....
I'll be honest. I'm a console jockey at best. Habits of the trade. So modifying the prebuilt html at the end is what I'm doing. It's what I have to do for 99% of tweaks for running software at work (since we usually use 3rd party tools where we don't have access to the source), so it's what I'm in the habit of doing.

That being said, I do only write my tweaks once.

I have a simple shell script that does the basic steps of making a backup of the clean index.html file, modifying all the settings that I tweak because I'm a terrible person at heart who can't be bothered with a challenge, then does a diff of the .bak and .html files to show all my changes to validate nothing out of the ordinary was modified unexpectedly due to new code being introduced. The second part is because I never trust anything to properly work, even if (or especially if I wrote it. )

Example output:
You don't have permission to view the spoiler content. Log in or register now.

Edit: I will admit that I find tweaking the code and seeing the changes work properly is something that I enjoy. Even if I'm technically "working off the clock" when doing so. It's half the reason I normally gravitate towards renpy games. python modding is fun.
 

ttyrke

Well-Known Member
Game Developer
Jun 10, 2017
1,561
1,909
356
I'll be honest. I'm a console jockey at best. Habits of the trade. So modifying the prebuilt html at the end is what I'm doing. It's what I have to do for 99% of tweaks for running software at work (since we usually use 3rd party tools where we don't have access to the source), so it's what I'm in the habit of doing.

That being said, I do only write my tweaks once.

I have a simple shell script that does the basic steps of making a backup of the clean index.html file, modifying all the settings that I tweak because I'm a terrible person at heart who can't be bothered with a challenge, then does a diff of the .bak and .html files to show all my changes to validate nothing out of the ordinary was modified unexpectedly due to new code being introduced. The second part is because I never trust anything to properly work, even if (or especially if I wrote it. )

Example output:
You don't have permission to view the spoiler content. Log in or register now.

Edit: I will admit that I find tweaking the code and seeing the changes work properly is something that I enjoy. Even if I'm technically "working off the clock" when doing so. It's half the reason I normally gravitate towards renpy games. python modding is fun.
There was an idea/suggestion/modding some time ago and I really liked that idea.
Basically at one point I want to create actual option to mod (not only change pictures).
Basically that guy injected his scripts in already rendered game, so .html file wasn't changed and those mods lived in different folder (mods). So with each update you won't need to edit html file but mods would work in any update as it would just be in different folder.
 
  • Like
Reactions: 5mithers

5mithers

Member
Aug 3, 2019
405
436
206
That would be pretty cool. But me personally, I am not requesting it. I know that I am not playing the game in the spirit it was created. I shortcut a lot because I enjoy the new content, but in general I don't have a ton of to play games after work these days.

I'm happy to have the game as is, I think it's great.

I'm excited to get through the new content and try out the mini hospital stuff.
 
Last edited:
  • Like
Reactions: ttyrke

youraccount69

I'm like a karate chop
Donor
Dec 30, 2020
8,514
3,897
436
ApocalypticWorld-0.41
You don't have permission to view the spoiler content. Log in or register now.
rpdl torrents are unaffiliated with F95Zone and the game developer.
Please note that we do not provide support for games.
For torrent-related issues use here, or join us on !
, . Downloading issues? Look here.​
 
  • Yay, update!
Reactions: Kira44444

ttyrke

Well-Known Member
Game Developer
Jun 10, 2017
1,561
1,909
356
will there be an update for the action pack?
I will try to spend some time on next tech update (0.43) for standalone extended mods.
That way could separate that big mod/pack in smaller and with each update won't need to update that actions js file and it will just extend existing images
 
  • Like
Reactions: exiled_nobility
3.70 star(s) 52 Votes