HTML Help programming a system that tracks what each character has done each day

MrC4rnage

New Member
Aug 21, 2019
3
0
Hello
First time making a thread here, so not even sure if I'm doing it right

I'm writing an HTML game, using Twine in Harlowe 3.3.9 format (Though I have been told to switch to SugarCube recently). I'm so fresh to coding that you can fully consider me an idiot.

The game is about bimbo fetish but I want to make it a "slowburn", so instead of women immediately being made into bimbos and no one reacting to it, the player would have to be smart with how to go about it. At the same time there would be NPC/Other possible MC working at the same time as you at making their own harems with pre-programmed actions for the day.

What I'm looking for help with is, how to write a script that tracks what each character has done each day
For example Enemy A is going to try and bimbofy Woman A, unless PC interrupts him/her or in PC's case whether the player picked route A, B or C for that specific day

and one that tracks at which point of becoming a bimbo each woman is (1-5).
 

osanaiko

Engaged Member
Modder
Jul 4, 2017
2,769
5,156
What you are asking is both a relatively simple thing to a programmer, and a near impossible challenge to explain quickly to a newcomer with no programming experience.

You could go three ways now:

1. stop and learn how to do basic programming with javascript. Something like would be perfect. spend an hour a day for 2 weeks and you will have a good basis for the taking the first steps with writing the javascript parts of the Twine game.

2. get some random snippets of code from people here or around the net, throw them together without really understanding, then spend a lot of time debugging. if you are persistent enough this can work, but it will not result in an easy-to-maintain game

3. start with a somewhat smaller and less ambitious gameplay concept - more like a VN with only a couple of choices, to get used to the process of making a game and dealing with basics of variables, branching, and stat checks.

Actually, there's a fourth: find someone to collaborate with to help on the coding design.

---

Speaking to your actual question:

"tracking" something means you store the choice made by the player in a variable. Lets call it "player_action"

Then at some point (e.g. once per game day) a function is run that will do the housekeeping.

Housekeeping would have a series of things such as:
- reset the "time of day" to morning again
- pay rent / restore energy etc
- Check the "player_action" variable, and then `if player_action == "defend girl`, modify some other variables (e.g. "girl_A_bimbo_level") depending on the choice.

---

Successful programming is about taking the concept and turning it into a series of logical repeatable steps. And being very, very organized. And testing everything manually, don't assume how something will work until you try it out.