ninjahedgehog

Member
Oct 23, 2018
427
319
216
Because I'd like to see mods to this game in the future, I'm adding my part by large chunk of code in html file to multiple smaller files that are loaded dynamically, so it is easier to navigate. In zip files there is only code part, I removed the images
Aw damn, I wish I knew how to code. I would at the very least add to the gifs that would appear instead of just replacing them
 

ninjahedgehog

Member
Oct 23, 2018
427
319
216
Because I'd like to see mods to this game in the future, I'm adding my part by large chunk of code in html file to multiple smaller files that are loaded dynamically, so it is easier to navigate. In zip files there is only code part, I removed the images
by any chance, can you give me a crash course of what I can do with this? I'd love to at least find out the gif triggers so I can start on a project to add video/gif triggers for ALL cards
 

ninjahedgehog

Member
Oct 23, 2018
427
319
216
OH MAH GAWD! Thanks to Chat GPT I learned how to add more video triggers. gonna be slowly implementing new video files for just about every card in the game lol. also changing some of the mp4s that don't quite fit with the theme of the deck it's with. The goal is to add at least 5 video triggers to each card
 

MachiPrime

New Member
Mar 5, 2024
7
2
81
As far as I remember there is an issue with "on card played" video randomiser. If there are more then x options to choose it has higher chances of choosing x(1)>x(2)>x(3) making the very 1st item in options appear very often
 

ninjahedgehog

Member
Oct 23, 2018
427
319
216
As far as I remember there is an issue with "on card played" video randomiser. If there are more then x options to choose it has higher chances of choosing x(1)>x(2)>x(3) making the very 1st item in options appear very often
I'll see if I can find whatever line of code is responsible for that. All I really found out, and is what I'm basing this huge mod for.

Each card has a giftype value. this value tells the game how many videos it can pull from with an equation to pull from card number + letter. for example if card 5 has giftype = 3 than it will pull from video 5a 5b or 5c. the exception being if the giftype is 1. then it would look for a video simply titled "5"
 

ninjahedgehog

Member
Oct 23, 2018
427
319
216
Interesting discovery!
There's was a cut card. card 34: "teacher's pet" it's card graphic no longer exists but the videos it triggers are still here
it would seem that it was part of the standard Whore pack. The cost was removed but the original effect was draw 1 and +1 brain (just like phone a friend) What do you guys think? should I try to restore it? redesign it?
 

winterchill86

Newbie
Apr 3, 2022
17
14
70
Interesting discovery!
There's was a cut card. card 34: "teacher's pet" it's card graphic no longer exists but the videos it triggers are still here
it would seem that it was part of the standard Whore pack. The cost was removed but the original effect was draw 1 and +1 brain (just like phone a friend) What do you guys think? should I try to restore it? redesign it?
im sorry if im asking something that might have been asked before but. do you think it's possible to create a feature for drag and drop cards and custom decks?
 

ninjahedgehog

Member
Oct 23, 2018
427
319
216
im sorry if im asking something that might have been asked before but. do you think it's possible to create a feature for drag and drop cards and custom decks?
I'm not sure what you mean. if you're talking about being able to move the card graphic around, The game is designed in a way where that's not necessary. Even if there is I'm not very experienced in coding, I'm just changing some numbers and adding video triggers right now. Maybe possibly, I can learn to add more cards but the way the game works I'd be acting a new deck, and It wouldn't be easy

Even for the teacher's pet data, it would be more accurate to ask "should I TRY restoring it"
 

Walland

New Member
Mar 16, 2018
3
1
91
Aw damn, I wish I knew how to code. I would at the very least add to the gifs that would appear instead of just replacing them
Have you joined the Apollo Seven discord? Sounds like you're getting to grips with things, but there's a mod channel there which would probably get better results than asking questions here. There's a link to the discord on the first page of this thread.
 

ninjahedgehog

Member
Oct 23, 2018
427
319
216
Have you joined the Apollo Seven discord? Sounds like you're getting to grips with things, but there's a mod channel there which would probably get better results than asking questions here. There's a link to the discord on the first page of this thread.
I just checked the discord. I asked about the magical girl mode coding but Apollo hasn't looked into the coding for so long that he can't remember.

I decided to take a break from adding animations to standard gameplay and decided to do the same for when magical girl or hentai pack mode, only to realize whatever logic handles that isn't the same as the cards when in standard gameplay. Asking chatgpt is a bit trial and error but i feel like i'm going nowhere fast
 

omuh

New Member
Apr 13, 2019
2
0
38
First post here but since I dabbed into modding the game for myself (mostly completing/changing gif), I figured I'd help on some stuff I figured out in the process :

As far as I remember there is an issue with "on card played" video randomiser. If there are more then x options to choose it has higher chances of choosing x(1)>x(2)>x(3) making the very 1st item in options appear very often
That's true. Whenever you play a card, the game picks a random number from 1 to 10. Then, depending on the card giftype (so how many gif the card has) it will assign a gif. For the case where a card has 10 gifs, that's pretty straight forward but if for example the card has 8 gifs, then the code goes : "for 1 > gif a, for 2, gif b" etc. until "for 7 gif g and else gif h". That means that for the results 8, 9 or 10, the gif h will be used.
The dev tried to balance things when getting into lower number of gifs but not greatly (for example for a card that has 2 gifs, the code has "if it's 1 or 2, use gif a, else use gif b" meaning the 2nd gif will come up 8 times out of 10. It should have been for 1 to 5 use gif a and for 6 to 10 use gif b).

Without changing the code too much, you can rebalance those by changing the conditions (obviously you can't divide 10 by all digits, but can get a better spread).

(A better way of doing it to begin with would have been that instead of always picking a random 10 when you play a card, make it so the game first checks how many gifs the card has (from the giftype) and then pick a random number from 1 to x (x being the giftype) and assign the gif accordingly. This way you'd always have an equal display of the different gifs and would be able to add as many gifs as you want as long as you update the giftype number for the card)

So after adjusting those odds , for adding content my process was the following :
- find the number of the card you want to add the content for (just check the name of the pic for the card ingame or browse the cards in the img/cardgame/cards folder)
- find the content you wanna add and make sure to convert it in mp4 format (and maybe make sure it's not too big in size as it will mess with the layout, depending on the type of display you use)
- save those in img/sidebar and name them from [cardnumber]a.mp4 to [cardnumber]j.mp4
- update the giftype by looking for the card in the code (either search for the name of the card or "setup.cards.card[cardnumber]" )

Some cards have a giftype above 10, those have a special behaviour (like using different gif depending if you're a top or bottom for the trans cards for example). I didn't really dive into those behaviours and just changed the giftype to regular ones (even if that meant losing the special behaviour) but there's most likely a way to add content to those too.

Hope it helps :)

There's one thing I haven't been able to locate in the code though, it's the TF range parameter for each card to make them appear in the buy piles.
 

ninjahedgehog

Member
Oct 23, 2018
427
319
216
First post here but since I dabbed into modding the game for myself (mostly completing/changing gif), I figured I'd help on some stuff I figured out in the process :


That's true. Whenever you play a card, the game picks a random number from 1 to 10. Then, depending on the card giftype (so how many gif the card has) it will assign a gif. For the case where a card has 10 gifs, that's pretty straight forward but if for example the card has 8 gifs, then the code goes : "for 1 > gif a, for 2, gif b" etc. until "for 7 gif g and else gif h". That means that for the results 8, 9 or 10, the gif h will be used.
The dev tried to balance things when getting into lower number of gifs but not greatly (for example for a card that has 2 gifs, the code has "if it's 1 or 2, use gif a, else use gif b" meaning the 2nd gif will come up 8 times out of 10. It should have been for 1 to 5 use gif a and for 6 to 10 use gif b).

Without changing the code too much, you can rebalance those by changing the conditions (obviously you can't divide 10 by all digits, but can get a better spread).

(A better way of doing it to begin with would have been that instead of always picking a random 10 when you play a card, make it so the game first checks how many gifs the card has (from the giftype) and then pick a random number from 1 to x (x being the giftype) and assign the gif accordingly. This way you'd always have an equal display of the different gifs and would be able to add as many gifs as you want as long as you update the giftype number for the card)

So after adjusting those odds , for adding content my process was the following :
- find the number of the card you want to add the content for (just check the name of the pic for the card ingame or browse the cards in the img/cardgame/cards folder)
- find the content you wanna add and make sure to convert it in mp4 format (and maybe make sure it's not too big in size as it will mess with the layout, depending on the type of display you use)
- save those in img/sidebar and name them from [cardnumber]a.mp4 to [cardnumber]j.mp4
- update the giftype by looking for the card in the code (either search for the name of the card or "setup.cards.card[cardnumber]" )

Some cards have a giftype above 10, those have a special behaviour (like using different gif depending if you're a top or bottom for the trans cards for example). I didn't really dive into those behaviours and just changed the giftype to regular ones (even if that meant losing the special behaviour) but there's most likely a way to add content to those too.

Hope it helps :)

There's one thing I haven't been able to locate in the code though, it's the TF range parameter for each card to make them appear in the buy piles.
that's pretty much what I've been doing lol. add mp4s as number and letter and then change giftype
the main exception are the magical girl cards which have a section for the corruption flip.
which speaking of, I've settled of making a seperate version of the game that plays hentai/2d/3d artwork and animations because I can't seem to do a similar process for magical girl image set
 

omuh

New Member
Apr 13, 2019
2
0
38
that's pretty much what I've been doing lol. add mp4s as number and letter and then change giftype
the main exception are the magical girl cards which have a section for the corruption flip.
which speaking of, I've settled of making a seperate version of the game that plays hentai/2d/3d artwork and animations because I can't seem to do a similar process for magical girl image set

Looks like there's only 2 cases for the magical girl scenario :

Either the card has multiple gifs and handles corruption switch in which case the game will display gif a or b for non corrupted and c or d for corrupted, so only 4 gifs total split in 2 for each card
On top of that the distrubition is pretty bad since you get a or c if the game rolls 2 or 3 but you get gifs b or d for 1,4,5,6,7,8,9 (but you can at least fix that to make it 50/50 by modifying the conditions)

Either the card only has one gif, and then it just displays that one (with no letter at the end, just [cardnumber].mp4

You can search for
Code:
document.getElementById('sideBar').src = "img/sidebar/magicalgirl/"
in the code to find those.

I haven't tried to see if it works, but with minimal adjustments to the code, either you stay with 4 gifs per card (2 non-corrupted / 2 corupted) and you just make it so it displays a or c for randgif = 1 to 5 and c or d for 6 to 10

Or if you want to increase the number of gifs per cards, you can try adding more conditions like for normal cards.
So for example if you want 10 gifs per card (5 non corrupt, 5 corrupt), you'd need to add more conditions so you end up with, if randgif = 1 / 2 then display gif a or f, if it's 3/4 then display gif b, g etc. until if it's 9/10, display e or j (that's not the actual code, but I hope you get the idea).
However, you'll have to commit to that number of gifs for each card that has multiple as there is currently only one case for that.
 
4.50 star(s) 61 Votes