[ / / / / / / / / ] [ b / n / boards ] [ operate / meta ] [ ]

/slavmaker/ - Slavmaker Modding Board

Board dedicated to modding Jack-O-Nine-Tails, aka Slavmaker

Catalog

8chan Bitcoin address: 1NpQaXqmCBji6gfX8UgaQEmEstvVY7U32C
The next generation of Infinity is here (discussion) (contribute)
Why CAPTCHA is being required from all users every 24 hours
Name
Email
Subject
Comment *
File
* = required field[▶ Show post options & limits]
Confused? See the FAQ.
Options
Password (For file and post deletion.)

Allowed file types:jpg, jpeg, gif, png, webm, mp4
Max filesize is 8 MB.
Max image dimensions are 10000 x 10000.
You may upload 5 per post.


 No.1

Here's a thread for general questions about the game's code, so you can figure things out without clogging up the general back at /hgg/.

 No.2

The current mystery that's bamboozling me:

How the hell does the player's strength value change? I'm looking at the code and as far as I can see calculate_atributes takes master_str and master_str_rate, sets their values to master["str"] and master_rate["str"], puts those in the $hero_con array, and it uses $master_rate[$hero_con[i]] to determine the new value of $master[$hero_con[i]]. So far, pretty straightforward. But for the life of me I can't see where the increased master["str"] is turned back into master_str, which is what the game actually uses. But if I make my test button increase master_str_rate it boosts strength properly.

What am I missing?

 No.5

>>2
No idea, tried to decipher that piece of code and hit the same wall as you, i would be interested to know the answer if you do manage to figure it out.

 No.6

>>5
I added libido to $hero_con list in #variative and it properly increases and decreases it based on master_rate['libido']. I just can't figure out how.

 No.7

>>6
Well consider me mindblow, what i initially thought (and sounds like you did too) is that
>$master_rate['str'] = 'master_str_rate'
Was storing that value into the array, this turned out to be very wrong, what it is storing is a simple string containing the variable name (what is the use of doing it every time is beyond me atm).
It then uses this string name to call the variable itself directly and compute the new values in
>dynamic '
><<$master[$hero_con[i]]>> = 0
>if <<$master_rate[$hero_con[i]]>> => 10: <<$master[$hero_con[i]]>> = 1
>if <<$master_rate[$hero_con[i]]>> => 20: <<$master[$hero_con[i]]>> = 2
>if <<$master_rate[$hero_con[i]]>> => 40: <<$master[$hero_con[i]]>> = 3
>if <<$master_rate[$hero_con[i]]>> => 80: <<$master[$hero_con[i]]>> = 4
>if <<$master_rate[$hero_con[i]]>> => 160: <<$master[$hero_con[i]]>> = 5
>'
So there was not any shifting of variables in the first place, the game worked with the two normal variables only.

 No.10

>>7
Holy shit. Mind is indeed blown. Thanks for figuring that out, it was bugging the hell out of me.

New conundrum: Is it possible to get QSP to check for the existence of a particular file as part of an IF check? If so, it'd make it a whole lot easier to make the slave packs modular.

 No.12

>>10
Tried to look through the documentation and tried a few things, i had no luck yet, the easiest way to do that imo is to expand on NINJ4 R4BBID's code for the external optional slave database, and make a sub menu to turn on and of the individual slaves.

 No.14

>>1

Unrelated to your question but you might want to check this out: http://www.hongfire.com/forum/showthread.php/434987-QUEST-SOFT-Jack-o-nine-tails-%28best-slave-maker-game%29?p=3657824#post3657824

beaver14 made an engine modification to allow playing videos, which might be useful to do some tutorials (actual tutorials that explains the mechanics and how to do things, not that carnage the game puts player through).


 No.21

For some reason I can't post over in /hgg/, it complains about it not being able to make sense of the URL of the video I'm trying to post even when I try a completely blank post. Lillibilli, can you let Zeek know that I'll do my best to add the new slaves to v6?


 No.22

>>21

Disregard, I figured out what the problem was.


 No.61

>>10

beaver14 seems to have made an engine modification to allow just that upon request. i will post the link as soon as he gives me the compiled version of the FastQSP engine.

Or you can talk to him directly here:

http://www.hongfire.com/forum/showthread.php/434987-QUEST-SOFT-Jack-o-nine-tails-%28best-slave-maker-game%29?p=3658979#post3658979


 No.62

>>61

Excellent, that sounds like exactly what I was looking for, and it would make it really easy to make it so hggmod can be modular with additional slave packs.


 No.70

>>62

He provided me with the links:

GitHub:

https://github.com/ItalianSunglassMovie/FastQSP

Windows Precompiled 32 bit, dynamic, all included.:

https://mega.co.nz/#!0cxjxa5L!0Pg9P9WTlZaudoSzKXli0T4GEp7Gj3gUwWmYYijV9EI


 No.74

>>70

Great! How does this work, do I just stick it in the FastQSP folder in the game folder?


 No.76

>>74

in theory yes, i'm testing it now.


 No.78

>>76

It seems to work fine, not sure if the new features do - I'm currently working in a guro toggle so I don't want to lose my place.


 No.80

>>78

>test_file_exist = %content\snd\test\Rolling_Stones_Paint_It_Black.mp3

>IF test_file_exist:

> msg ' the file exist: <<test_file_exist>>'

>ELSE

> msg ' the file does not exist: <<test_file_exist>>'

>END

works as expected, if the file exist the variable is set to 1 otherwise it is 0.


 No.84

>>80

Excellent, thanks for checking that.


 No.107

Hi guys,

Now I found this thread (thanks Lillibilli), I will also follow here.

It's me who made the modifications to the engine, so any comments about it can be posted here.

Would be awesome with modular slave packs, but I am not quite sure if it can be done properly, with the current file check code.

Because the name of the file has to be known in advance, and can't be generated from QSP code.

That would mean hardcoding a check to each individual future slave pack, which is not good design. Would be better to do in a loop.

But maybe I have missed something, I don't know how it exactly is thought to be made.

(actually I thought NINJ4 R4BBID already had made this possible somehow - have not checked it out though)


 No.108

hello beaver14 welcome

so guys i'v been searching for some music to use as bgms for my game and i thought i would share it, didn't want to continue at /hgg/ cuz it's suppose to be Boney_M's thread for his mod, so if someone finds my collection good enough for his taste he is free to use it and if not then well here is the code to make it work and your job is to rename the music file you don't like with yours

at Start page

change these

$music['ride'] = 'content\snd\muz_podonya.mp3'

$music['arena'] = 'content\snd\muz_fight_arena.mp3'

$music['girl'] = 'content\snd\muz_fight_girl.mp3'

$music['fight'] = 'content\snd\muz_fight.mp3'

to these

$music['ride'] = 'content\snd\race_master.mp3'

$music['arena'] = 'content\snd\fight_arena.mp3'

$music['girl'] = 'content\snd\fight_girl.mp3'

$music['fight'] = 'content\snd\fight_master.mp3'

*(that will change the race master fight vs fog mobs/rebel slave and slave/master fighting in the arena)*

at main_menu page

after the first line add these

IF sound_on = 1 and achtung_pass = 1:

play 'content/snd/mainscreen.mp3', 75

else

close 'content/snd/mainscreen.mp3'

end

at main_screen page

add these at the first line

IF sound_on = 1:

play 'content/snd/home.mp3', 75

close 'content/snd/city.mp3'

close 'content/snd/mainscreen.mp3'

else

close 'content/snd/home.mp3'

end

at city_screen page

add these at the first line

IF sound_on = 1:

play 'content/snd/city.mp3', 75

close 'content/snd/home.mp3'

else

close 'content/snd/city.mp3'

end

IF sound_on = 1:

play 'content/snd/city.mp3', 75

close 'content/snd/race.mp3'

else

close 'content/snd/city.mp3'

end

IF sound_on = 1:

play 'content/snd/city.mp3', 75

close 'content/snd/vaitcan.mp3'

else

close 'content/snd/city.mp3'

end

IF sound_on = 1:

play 'content/snd/city.mp3', 75

close 'content/snd/tower.mp3'

else

close 'content/snd/city.mp3'

end

IF sound_on = 1:

play 'content/snd/city.mp3', 75

close 'content/snd/spires.mp3'

else

close 'content/snd/city.mp3'

end

IF sound_on = 1:

play 'content/snd/city.mp3', 75

close 'content/snd/citadel.mp3'

else

close 'content/snd/city.mp3'

end

IF sound_on = 1:

play 'content/snd/city.mp3', 75

close 'content/snd/palace.mp3'

else

close 'content/snd/city.mp3'

end

at interaction_city

add these codes according to there line number

line 3125 under (!VATICAN) interaction

IF sound_on = 1:

play 'content/snd/vaitcan.mp3', 75

close 'content/snd/city.mp3'

else

close 'content/snd/vaitcan.mp3'

end

line 3761 under (!White palace) interaction

IF sound_on = 1:

play 'content/snd/palace.mp3', 75

close 'content/snd/city.mp3'

else

close 'content/snd/palace.mp3'

end

line 5232 under (!Administrative spires) interaction

IF sound_on = 1:

play 'content/snd/spires.mp3', 75

close 'content/snd/city.mp3'

else

close 'content/snd/spires.mp3'

end

line 5763 under (!Tierra del Citadel) interaction

IF sound_on = 1:

play 'content/snd/citadel.mp3', 75

close 'content/snd/city.mp3'

else

close 'content/snd/citadel.mp3'

end

line 6362 under (!Воронья башня) interaction

IF sound_on = 1:

play 'content/snd/tower.mp3', 75

close 'content/snd/city.mp3'

else

close 'content/snd/tower.mp3'

end

*(that will make a particular bgm ends when another particular one starts)*

at menu_from

line 6

!CLOSE ALL

at city_menu_form

line 2

!CLOSE ALL

at раскладка_бой

line2

CLOSE ALL

at $ride_start

line 2

CLOSE ALL

at $ride_finish

line 2

CLOSE ALL

at main_menu

line 29

!CLOSE ALL

*(that will make sure the bgms stops where it should stop not till it just ends or if you click any action)*

the following mp3's are to be added in content\snd

https://mega.co.nz/#!eIwzxCzJ!TUyfmVN9WRcC6Li-CGONhyC66ye07Jz7ZS5AG5eCkRM


 No.109

Thanks for welcome, and now we have two conversations going :-)

Regarding the sound, I just want to say: WOW!!

I have made the changes, just as you described, and it works perfectly. I absolutely love it.

Was hoping you would do it :-)

It was something that was really missing in my opinion.

The music you have chosen are very well chosen, kudos.

Right now I am experimenting with fadeout, when tracks change, because the transition when changing scenes, can be a little abrupt.

Also I am thinking about making the music loop, and how to that.


 No.110

>>107

>That would mean hardcoding a check to each individual future slave pack

For what i understand that's Boney M plan atm, the advantage would be that the ultimate user can download only the extra slaves he likes without having to download a whole pack.

they would still need to be hardcoded either way with the current system.

>Because the name of the file has to be known in advance, and can't be generated from QSP code.

this might not be true, i need to do some tests

>actually I thought NINJ4 R4BBID already had made this possible somehow

true, in his mod there is code for the insertion of an external database, imo the best way to do this is to use both, so that the hardcoded slave packs can be updated independently from the game itself while still allowing for modularity.


 No.111

>>107

>Because the name of the file has to be known in advance, and can't be generated from QSP code.

did a few test and making a dynamic check is possible as long as a template for extra slaves is followed.

proof of concept code:

>i = 0

>:file_check

>i += 1

>dynamic 'file_to_check = %content\snd\test\Paint_It_Black<<i>>.mp3'

>

>IF file_to_check:

> msg ' the file is present'

> files_present[i] = 1

>ELSE

> msg ' the file is not present'

>END

>

>IF i < 3: jump 'file_check'

What this does is that it can dynamically recognize an indexed template and compute code based on that index, by making the additional slave indexed we can use a simple loop to add slaves on the fly, with the upper bound of the loop check (which if it gets too small can be updated later on).


 No.112

>>111

That was exactly what I didn't think could be done, and what made me make my comment. I stand happily corrected. This is extremely cool. Thanks for showing me how to do it.


 No.117

>>107

Thanks for updating the engine, this is going to make it a whole lot easier to let people add new slaves to the game without ballooning up the mod size to hundreds of megabytes.

And yeah, hardcoding is not good design. A lot of things in this game aren't good design. The reason so few people mod a game this popular is it takes a certain degree of masochism to suffer through the code.

>>108

Neat! Tell you what: rename any files that are duplicates of existing ones, put in a 1kb dummy file called something like powerairmaxmusic.mp3 for the game to check for, and put them all in a separate folder inside the \content\snd folder, and I'll work in a check in the next version of the mod to check if those files are present, and if they are it'll use those mp3s instead of the default.

Though if you're still working on improving or expanding it, leave off on making it official until you're done.

>>111

You probably saved me hours of fucking around with the code here. Much appreciated.


 No.118

>>108

i see that you hardcoded the volume, you might want to use the variables "sound_volume" and "music_volume" (which are what the option menu sets) so that the player can set the volume on his/her own.


 No.119

>>117

i don't quite understand what's the point of doing that

>>118

ya iam working on it


 No.120

>>119

Modularity, so that if a player downloads the sound pack he can put it into his version and it will work right away but if the player does not they will have the default sounds.

>1kb dummy file called something like powerairmaxmusic.mp3

wouldn't it be easier and cleaner to check for the first file of a new folder?

that way new soundtrack can be swapped out at will as the code will check if a custom soundtrack is there at all not for which custom soundtrack is there (which could become a problem to code if multiple packs are done the same way).


 No.121

>>119

If someone has to download a program and write code to make something happen, probably 19 people in 20 won't bother. If all they have to do is unzip files into a folder, much more people will do it.

>>120

I was thinking more about working in Powerairmax's soundtrack specifically. You're right that a standardized system for music would work better, though. I'll see what I can whip up.


 No.122

>>108

if someone knows how to make the volume change based on the game music volume you more than welcome to share your knowledge

cuz mine is monkey see monkey do

and this type of code doesn't seem to allow that sort of thing to happen unless im missing something obvious


 No.123

>>122

the code to play something is

>play 'content/snd/tower.mp3', 75

this calls the function "play" with 2 arguments: the path to the file and the volume

if instead you use as code

>play 'content/snd/tower.mp3', music_volume

it will use as argument for volume the variable "music_volume"

This variables is in turn set by the option menu based on the volume the player chooses (which goes in increments of 10, starting from 0 and maxing at 100).


 No.124

>>123

well there has to be more than that cuz for the past 6 hours i was trying non-stop and one of the things i tried was doing as you said but it didn't work


 No.125

>>124

update:

play 'content/snd/tower.mp3', music_volume works under a condition, the sound must be muted then unmute it then the music will play by how low or loud you set it from the options


 No.126

>>125

lol now that i think about it

when the game actually plays music like when doing some sort of action or in a fight or a race, you don't have the option to turn down the music, so that would explain why the music doesn't volume doesn't change unless it stops by any means and restart again

idk if there is a code that change the dynamically change the volume of a sound file while it's playing in the game

so i guess for now what can be done is changing the number 75 at the end of the codes to music_volume

so Boney_M should i proceed in this 1kb dummy file you asked ? btw idk how to make but will look it up if that's what you wanted but if else im waiting


 No.127

Pretty big update to the audio system (should make your life easier Powerairmax):

https://mega.co.nz/#!Udg31Q5R!OQjeaywHlNiUUTqm_SLmH_y-jOJen_ZSuC6h82DWRA8

https://github.com/ItalianSunglassMovie/FastQSP/commit/9af09ee7a8f79546b67801ae2f579ad60a00cbef

It adds a possible third argument to the play statement.

Example:

In city_screen, audio code can now be this:

IF sound_on = 1:

play 'content/snd/city.mp3', 75, '!@'

else

close 'content/snd/city.mp3'

end

The third argument is a string with flags affecting the audio stream.

! means - close all other music stream, except this one if it is playing.

@ means - loop this stream infinitely

you can also write 'only' instead of ! and 'loop' instead of @.

eg.

play 'content/snd/city.mp3', 75, 'only, loop'

The string is searched for the words, so if you think it is more expressive, then you can also write:

play 'content/snd/city.mp3', 75, 'only this music track, because it is awesome, and loop it btw.'

:-) you get the idea.

Also audio fades out over 500 ms, when stopped. I think it is better, but not completely sure.

Since it is a pretty big commit and I am in a bit of a hurry, expect some bugs, but please test it. In basic testing, it works as expected.

It should be fully backwards compatible.


 No.128

>>126

idk if there is a code that change the dynamically change the volume of a sound file while it's playing in the game

Currently it cannot be done. But I can make it if you want?


 No.129

>>127

oh that looks actually good that means i don't have to hardcode the whole sound pack and assign them to music A play and mucis B C D E close, that's really helpful :D and loop ? does it mean it will loop ? im gonna test it now

>>128

i haven't found any code in the main game since it only had sounds running when you either do an action with slave like sex or talk and when in race and when in a fight and all these examples you don't have the option to control the volume in it there is just the mute and unmute button

and yes i would love to have a code that can do that if it you have the time and the will to do it


 No.130

>>129

Yeah, loop means it just plays again, when it is finished.

Right now I don't have the time to make it, and I don't know how it should work.

But if it is a matter of just calling play again with a new volume value, it is trivial to update the currently playing sound with the new volume - even fade it to the new volume over a time period :-)


 No.131

>>130

just tried it now it's working fine so far it starts what i told the game to start and it did loop after it finished

as for the volume, the game kinda does change the volume of a certain sound file but you have to make it stop by any means of action in the game to let it start again with a different volume

though if if calling play again a new volume means i can click on the red minus icon at music and the sound will stop and start again in a lowe volume that should be fair enough


 No.144

guys what makes a code accept more than elseif and what makes it doesn't ?


 No.145

>>144

I'm not sure i understand the question so if this is not what you are looking please explain yourself better.

An IF statement is a flow control method.

example:

test = 3

IF test = 1:

msg ' the condition is true'

ELSEIF test = 2:

msg ' the second conditional is true'

ELSE

msg ' all of the above is false'

END

This statement checks the variable "test" and prints a message box based on what number it is

the first part checks if "test" is 1, if it is it prints the message,

if it is not it checks if "test" is 2, and prints the second message if it is

last if both the checks result false (like in the example since it is set to 3) it will print the last message.

An ELSEIF statement is nothing else than telling the program to do something if the previous condition is false but the current one is true.


 No.146

>>145

the issue here is the code im trying to make checks for 2 tests different from each other

the code checks for master excitement and slave energy

it checks if master excitement high=msg1

if master excitement low=msg2

if slave energy hig=msg3

if slave energy low=msg4

and here comes the problem it only checks for the master excitement

im trying to apply this code at slave activities>sex

now keep in mind that same code structure i used it on invite a tutor codes and it worked just perfect, it was checking the slave skills,slave energy,sparks and the conditions of work like house mess,lab and food ready

i don't know why is it not working this time


 No.147

>>146

if you post the problematic piece of code and exactly what you are trying to do i can take a look at it, i can't understand the problem from this post alone.


 No.148

here http://pastebin.com/xxrMdmNP

cuz the mighty 8chan doesn't allow a href to be written for some reason


 No.149

>>148

The problem that you seems to have is that you misunderstood how the IF statement works as noted by this comment:

>if any of it is low then it gives the certain type of msg

this is most certainly NOT how the IF statement works.

What your code does instead is checking if the master_excitement variable is more than 0 AND the slave energy is more than -5, in which case it prints the first message:

IF master_excitement > 0 and slave["energy"] > -5:

If the above is true it ignores the rest of the code and goes directly to the end of the IF statement (defined by END) and resumes working the code from there,

if instead the above is false it checks the next ELSEIF, in this case if master_excitement is less than 1 and prints the related message (and skips the other checks)

elseif master_excitement < 1:

If the second check is also false it checks if the slave energy is 0, if it is it prints the 3rd message (and skips the 4th check),

elseif slave["energy"] = 0:

Lastly if all the above is false it checks if the slave energy is -4 and prints the last message if it is.

elseif slave["energy"] = -4:

if all of the above is false it will simply skip the block

What i noticed is the obvious error of the 3rd and 4th check: the conditionals are simply impossible to reach since if the first block is false it must be either because master_excitement is 0 or lower triggering the second check or the slave energy is -5 which makes all the conditional false.

that's why the code is not working, you made the logic impossible.


 No.150

>>149

so what's the logical fix ? cuz i'v tried different things before and wasn't working as well

tired removing elseif master_excitement < 1: and tried putting it at the end of code so it doesn't read this first and tried swaping the start of the code so it check for slave energy first but still not working


 No.151

>>148

Now why does the other code work you ask?

Well actually it doesn't for the same reason, only in this case it works partially.

The first check test if all the condition to invite the tutor are met:

IF house_mess > 0 and slave['service'] < 5 and slave["energy"] > -5 and sparks > 15:

If it is false it will check if it failed because of the house mess is 0

else if house_mess = 0:

If that fails it will test the next possibility, the slave might be too skilled

else if slave['service'] = 5:

If that also fails it could be the slave energy is at 0:

else if slave["energy"] = 0:

And if that also fails it could be that it is -4:

else if slave["energy"] = -4:

If all the above returned false it does one last check before giving up on the statement:

else if sparks < 15:

If one of those is passed it prints the related message, else it skips the block.

the problem being the slave energy checks again, if the slave has -5 but pass all other test the block will be skipped,

it also almost impossible to pass the energy checks because the spark check must also have failed for those to be reached and be (potentially) true


 No.152

>>150

When working with this type of situation you make the first check all the required variables for the action

IF master_excitement > 0 and slave["energy"] > -5:

Then make the ELSEIF based on why it could have failed

In this case it could have been because the master excitement is too low:

elseif master_excitement < 1:

Or because the slave energy is -5

elseif slave["energy"] = -5:

the order that you write the ELSEIF determine the priority of the message, in this case if both the master excitement is low and the slave energy is at -5 the priority is on the master excitement check for the simple reason that it is returned true before the other has a chance to be evaluated.

For good measure also add an ELSE at the end to catch possibilities that you might not have considered (the ELSE statement works when all the previous IF and ELSEIF resulted in false)


 No.153

the parks can be ignored since the statement in slave activities check for sparks to open the statement to begin with

IF sparks > 25:

$text_display += '<br><div id="Invite_a_tutor">

else

$text_display += {<br><div id="Invite_a_tutor_gray">


 No.154

>>150

If this still doesn't sit well with you i would advice getting some experience with coding with some online course (http://www.codecademy.com/ is quite a good course, i advice ruby since it seems quite similar to QSP), while the languages might be different the basic of coding are the same (but with a different syntax).


 No.155

thx man fixed the problem

i think i wasn't making slave energy check accurate that's why


 No.159

so Strec continuing on

you know it can be more involved not just consuming energy from a slave or assistant when you walk outside but for example you can get your slave or assistant to fight with you in the fog and non devoted slaves would run away from you when you take them outside, send assistant to do more stuff for you like not just buying food but also getting contracts for you from the slavers guild or going to the slave market and get you a slave to train and more and more, there is so much that can be done to it to expand the experience of the game outside the house


 No.160

>>159

Slaves and assistants fighting with you was planed by the_vm but never realized, as it is now the combat code is all in russian and as such difficult to modify until a translation is done.

As for the energy not dropping from the slave/assistant i would leave it as it is, while more realistic it would cause player inconvenience with no particular reward for it, as Boney M said on th subject:

>The question of who exactly goes out with the master is handwaved in the base game. If the master goes to the doctor, the slave's there. If he goes wandering on the border of the fogs, the slave isn't loitering on the edge of the battlefield. Having to micromanage who's travelling with the master would barely increase realism while fairly significantly increasing busywork.


 No.161

Slaves in combat is not so important for now while combat are easy.

Would be interesting if there were items to loot in combat.


 No.162

>>160

well the game kinda lacks busywork outside home anyway

>>161

ya you got a point, in combat you can just spam one of the attack options and 99% of the times you end up winning


 No.163

>>162

>you can just spam one of the attack options and 99% of the times you end up winning

There is actually more to it than that, if i start in sandbox in patrician mode with maxed stats i still get trampled over by all but the weakest of foes, in a game where i actually played with way worse stat and equip i easily win.

I have yet to figure out how combat actually works.


 No.166

guys there is an idea i want to hear your opinions about it

increase the amount of the energy points for master,slave,assistant and make the type action you about to do effected in energy by how skilled you or your slave/assistant in it

for example energy points are 15

slave with unskilled housekeeping skills would consume 4 energy points to clean up the house while skilled slave would consume 1 energy point

same applies to master and assistant


 No.167

>>166

Not a fan of the idea.

The energy system is closely tied to the calorie system and mood system, so if you change one you need to change the others to match (not to mention the UI), which can quickly spiral out of control and difficult to rebalance.

But even if the above wasn't true i still would not be a fan of the idea.


 No.168

Oh yeah! :-D

Just now I have successfully hooked into the slave variables, replacing (I think, it can also add) variable data, with data from an external JSON document.

This works, both on existing saves, and a new game.

This mean being able to move slaves out of jack.qsp and into separate nice looking JSON files :-)

Also this will be backwards compatible.

Will make a new build, when the code it is ready :-)

Just happy that it works :-)


 No.169

>>168

That sounds nice (if what you means is that there will be more modularity possible on slaves), but i'm afraid i'm not familiar with JSON, what's the advantage to using those?


 No.170

Seems very exiting but wich datas are concerned?

Attributes (Intellect, Stamina, …)? History (family, origin, …)

Second, did you replace only datas vars on initialization or each time they are used?


 No.171

>>169

It's basicly like being able to store slaves in xml documents, so you just have to add an xml document in a folder to add a slave/add the xml to the slave xml file.


 No.172

>>169

Yes, this will mean more modularity.

For instance add, edit, remove slaves without touching jack.qsp.

The advantage of JSON, is that it is easy to read and write for humans. Basically the syntax will be very similar to QSP.

This is a valid JSON file:

{

"variable_name": "variable_value",

"another_variable: "something_else"

}

Thinking about making a special key to specify array indices, but have to think it through.

I chose JSON because of the simplicity and because library is easy and ready to use.

>>170

Every variable in the game can be changed or added, through this mechanism. So far, I have only implemented manipulation of string values, but the rest should be trivial.

It only replace/add data when creating a new game or loading a saved game, not each time they are used.

>>171

Exactly!

Just chose JSON instead of XML, because XML is not necessary, and is more tedious to manually edit.


 No.178

Finally! At long last I have something to show.

This has been a hard development session, with lots of thoughts, problems and also some personal issues.

But that aside - I have now made a new build :-)

There is:

- JSON integration

- a GUI option to disable CRC check (No more debug = 1 crap)

- a quick fix to allow changing volume on a track that is playing (haven't tested that feature, but I assume it works).

https://github.com/ItalianSunglassMovie/FastQSP

Direct download: https://mega.co.nz/#!cNxylCJB!0piV72u-7vEWmZKmWjPI4aPA6WhR37fO_mNTepBlht0

#slave_base converted to JSON: https://mega.co.nz/#!NQo0UKyL!1bEBrkS013EaRpV2TOlfmgM4rj1xh0GGqbj2HjKrPrk

With this build and the JSON folder extracted to <gamedir>/json, you can delete #slave_base from jack.qsp.

To add extra slaves I suggest start using the variables from the bundled slave_index.json file.

For example:

In interface/plastics, there are 3 sets of min_txt and txt_count. These should be assigned the proper variables from slave_index.json.

There are probably similar things around, in other places.

Then later, it will all be a matter keeping that index file up to date. Someone could even make a GUI (separate from the game - or in the game engine), to manage slaves or slave packs.

I suggest testing it, see if it works as expected - and if it works, start moving constants out to JSON files. I think that all constants should be declared in JSON. And then keep them as constants (if possible). There is nothing preventing them from being overwritten, during execution of the game.

The JSON files are loaded as the last thing in the creation of a new game, and as the last thing when loading a save game. At these two times, corresponding variables will be overwritten by JSON data.

The json directory is scanned recursively. So feel free to create any directory structure you like.

JSON files that that is not starting with a number, means array indice 0.

$variable = 'something' and $variable[0] = 'something' are equivalent in QSP.

JSON files prepended with a number and an underscore, specifies the array index.

Eg.

5_a_name.json - all variables in this file will be assigned to variable_name[5].

It sounds a little complicated, now that I write it, but it really isn't.

Just look at the JSON files I provided, it will make sense immediately.

I plan to take a break from developing on this - Real life calls, and I want to answer.

But I am very curious about what you will make of this, and I will be following the development.

Please report any bugs you find.

Also if you have any suggestions to make it better, don't hold back.

I want this to be done right, before I let go of it.

/beaver14


 No.179

>>178

by gamedir you mean FastQSP folder or Contents folder or somewhere else ?


 No.180

>>179

nvm got it, json folder goes next to Jack-o-nine-tails folder where the contents folder and save folder and fonts folder and the jack.qsp is and it's looking good so far everything is working as of yet


 No.181

>>179

>>180

it's me….for some reason the web didn't load my name


 No.182

Nice :-) glad to know, that it seems to be working.

Yeah, thats right, inside the Jack-o-nine-tails folder. I think it is the most appropriate place.


 No.183

>>182

i think so as well,

trying to add my own slave right now

so far for future slave packs if someone want to go by standards they will go with what boney M suggested at his mod thread

but if someone else like me who wants unique slaves we still gonna have to hardcode the picture names in the json file for the game to read it


 No.184

I know Boney M had some plans on the matter, but II have not read what his thoughts are.

Will check out his thread tomorrow.

But yes, in all situations the picture names has to be written somewhere. With the JSON files, a tool could also be made to automate this. Or slaves could be zipped. Pictures and JSON file could be in a zipped archive. The just drop in in zip file in a folder, to install a new slave.

Finding the pictures, is the biggest task though.

Unless someone will create OPL2 3D version, haha :-) but really, it will just be the same situation, but with different data.


 No.185

as far it went for me i was able to my own slave and bought her from slave market and was able to get her by guild contract and won her in a fight at the fog and was able to do neoplasty to both my slave and assistant to change there look to my new added slave, results are very good ^^


 No.187

>>185

That's really great to hear Powerairmax :-)

I am happy it works as expected.

I am curious if you modified an existing slave, or made a new one with a new number?

If you made one with a new number, did you change anything in jack.qsp, besides the variables in interface/plastics? (And the index, in slave_index.json)


 No.188

>>187

i added a new slave so ya new number

and nope nothing else beside changing maximum in plastics and slave_index.json

i added 1 young slave so raised the maximum from 273 to 274 and my slave is in the game now


 No.189

>>187

one thing though how do i make the track volume change while it's playing ? i assume there is something to be added to make that work


 No.190

>>188

Wow, didn't think it would be that simple. Cool.

Thanks for testing.

>>189

To change the volume, just play the track again, with a new volume value.

It won't start from the beginning.

It also updates the flags on the track(loop/only play this), so if you don't want them changed, just run the exact same play command, with only a new volume value. It should be applied immediately - there is no fade.

If you need it to work in an other way, let me know.


 No.191

btw. txt, min and count in plastics, should be set to the corresponding variables from slave_index.json.

Then you don't have to change it in the future again.

Don't know if I was clear about that.

IF slave['age'] = CONST_INT['young_age'] and txt = 0:

txt = young_first

min_txt = young_first

txt_count = young_last

END

IF slave['age'] = CONST_INT['loli_age'] and txt = 0:

txt = loli_first

min_txt = loli_first

txt_count = loli_last

END

IF slave['age'] = CONST_INT['milf_age'] and txt = 0:

txt = milf_first

min_txt = milf_first

txt_count = milf_last

END


 No.192

>>191

it depends on how you set the numbers for example you can make loli start from 1 to 1000 and young from 1001 to 2000 and milf from 2001 to 3000 xD i know it's ridicules numbers here but the point is we will still change the numbers again if everything fills unless it's possible to make 2 sets of counts


 No.193

>>192

You should not clutter the code with constants, set in that way. It is bad practise.

The reason is, that such constants should only be defined in one place, so when need changed - the work, will be minimal, and you can be sure, that you have not forgot anything - so less bugs, and more serenity :-)

In this example if you set such a large value on the text_count variable, the end arrow won't disappear when you reach the end.

And you would need to adjust the numbers on all the slave files accordingly.

It is unnecessary work.

If all places use these variables defined in slave_index.json, then that will be the only place to adjust, when modifying the number of slaves - and actually, this is only a temporary solution.

These numbers, can be automatically generated, by adding an extra property on each slave - defining whether the slave is loli, young or milf. This can be done by a simple script.

But the variables, has to be used everywhere necessary, before it will make sense to implement that feature, because it will be invisible, and therefore less obvious for new modders.


 No.194

>>193

Well the obviousness for new modders, is actually a bad excuse.

I simply had not thought about that feature before.

If the JSON variables regarding slaves, are used everywhere - I can get rid of the numbers on slaves all together.

No more specifying array indices or adjusting indexes anywhere.

Just drop a slave definition in a folder, with whatever filename, and it will appear in the game, without any configuration. It would work for one, and it would work for a thousand. Doesn't matter.


 No.195

>>194

found 2 slaves missing codes

slave number 224 and 236 one was missing fullimage,fullmade,fullmistress,fullsecretary and one was just empty file

here is the fix for them

https://mega.co.nz/#!DAZ3RAoL!Hv-xgqlAo1ENyYx_1SEU2DYL5bndi8f1yKwwiy5eLvM

i checked all the other slaves looks like it was just these 2


 No.196

>>195

Thank you.

The JSON files were generated through a small program I wrote. Did only check a few, to see if they looked OK.


 No.200

hi guys I've decided to rewrite this game in a real language (python using the engine renpy) because fuck QSP.

I've already made all the places structure and menus and images.

I still need to :

1)write all the texts

2)find and write all the formulas related to every stats (their training etc…)

3)create my own random slave generator (this one should be easy)

I'd like to know if it's possible to have a file with all the texts in this game. Even if it's just a single file with all text dumped in here, some quick copy pasta will make the step 1 incredibly faster.


 No.201

>>200

use Qgen to open the jack.qsp

the game texts are mostly in #txt location

you can also check this https://github.com/ItalianSunglassMovie/Jack-HF the whole source of the game is on github


 No.202

>>200

Hi Anon,

That is a _huge_ project.

I have had the same thought myself, but decided to go against it, because of the complexity and amount of work.

It would be wonderful to get rid of QSP though (lately it has really been a pain).

I am very curious to see how much you have made so far.

Can you share the source?

Powerairmax and I are in the middle of an almost complete menu rewrite right now. And we are in the middle of joining the scattered development process of the game. Please share what you got - maybe our time is better used, working on your project than continuing our way.


 No.203

>>202

here:

https://mega.co.nz/#F!dw8yQbhL!XQLlzRbLoEtJajzYPJg_6A

you gonna need renpy (a free VN engine ) to lanch it.

you also gonna need to copy in the empty pic folder the pic folder from your game.

So basically there are all the basic menus and only the one who's action is just to jump elsewhere actually do something.


 No.204

>>203

Thank you for sharing your code.

Your project is still in its infancy, and not mature enough for my needs.

I wish you great luck and good times programming it.

Have a nice day :-)




[Return][Go to top][Catalog][Post a Reply]
Delete Post [ ]
[]
[ / / / / / / / / ] [ b / n / boards ] [ operate / meta ] [ ]