HentHighSchool Development Forum

Game Development => HHS+ => HHS+ Development => Topic started by: superevilking on Apr 17, 2024, 12:58 AM

Title: Question about modding
Post by: superevilking on Apr 17, 2024, 12:58 AM
So, I'm wanting to make a few small mods, and I'm going off a guide on here but I have a stupid question. Is there a way to add on to a existing event that is already part of the game itself? I'm planning to add something to the unruly class for if you choose not the help out. Instead of just changes in some stats, I want to add that depending on Lust/corruption/authority it has a chance to show an image or start an event.

At the same time, any tips from people who have been making mods for this game for a long time would be helpful.
Title: Re: Question about modding
Post by: DeniedInMontana on Apr 17, 2024, 08:04 AM
Quote from: superevilking on Apr 17, 2024, 12:58 AMSo, I'm wanting to make a few small mods, and I'm going off a guide on here but I have a stupid question.
The only stupid question is the one unasked.

Quote from: superevilking on Apr 17, 2024, 12:58 AMIs there a way to add on to a existing event that is already part of the game itself? I'm planning to add something to the unruly class for if you choose not the help out. Instead of just changes in some stats, I want to add that depending on Lust/corruption/authority it has a chance to show an image or start an event.
In the mod folder that you have created, you will want to have the same folder structure as the game itself does, such as Mods/ModName/Events/Location/School/ClassroomShared (just running off memory, not at home to check).  Then you will copy the file you want to add to from the NormalSchool/Events/Location/School/ClassroomShared to your mod folder, and edit that file.  When you have the edits you want, save in your mod folder directory (you don't need to worry about the one in the base game) with the same file name - your mod will take precedence over the one in the base game.

I personally work in the VEE editor rather than Notepad++, so I'll describe what I understand. 

Hopefully this helps you out - if you're trying to figure out how to get the average of a group's stat, look at the file for the nudity bomb event which can be found in one of the old folders of barteke22's mod list.  For that matter, look in other events which have branching choices and see if any other coding layouts are similar to what you're looking for.  There's no harm in copying someone else's work for this - it's all free, and if they've already figured it out, you can learn from what they've done.
Title: Re: Question about modding
Post by: superevilking on Apr 17, 2024, 04:16 PM
I'm actually using the guide by barteke22 on modding. I'm slowing learning the basics and when I'm ready I will try to make the idea I mentioned above but simplified. Most likely having it be where if you choose not to help it shows an image of the students taking control and restraining the teacher. Also thanks for the tips you gave it will help for when I go to expand on it.
Title: Re: Question about modding
Post by: superevilking on Apr 18, 2024, 06:17 PM
Started working on a Mod, heavily going off of both the guide and pre-existing events to build what I need.
Title: Re: Question about modding
Post by: superevilking on Apr 19, 2024, 12:43 AM
I must be missing something in the guide, but two questions I have now are:

1. How do I add a NPC to a list like Hired teachers?

2. How do I get a NPC in a mod to appear in the game? So far each attempt I tried, following how NPC in game and in a mod are set up but each time it doesn't load them in.

Asking these now cause I will most likely not see anything until tomorrow. Thanks in advance.
Title: Re: Question about modding
Post by: DeniedInMontana on Apr 19, 2024, 07:46 AM
For your first question, in the SpecialCharacter folder where they are stored, you need to be sure their job is set as Teacher and salary is set before the game ever starts, as well as any specific stats (body sizes, personality, etc.).  Then you'll have to actually hire them in the game from the school management panel.  (Look at April Raymund for an example of what I mean.)

For the second question, they should load in automatically on starting a new game.  If you're trying to add them into an existing game save, you'll click on Debug > Modules > Check your module to make sure it's active.  Then Debug > Reload Events > All Changed Events (checks for any files saved to the hard drive since the game was first initialized by date only).  This will take a moment to scan all files in the base game directory as well as the mod folder.  Once the list appears, click "Refresh Files" at the bottom of the debug screen.  I personally then highlight one of the files, press CTRL-A to select them all, and click remove - then click All Changed Events again.  Nothing should show up this time.  Finally, click on the Person tab and search for your added person starting with the first name.  If they show up, you have done it successfully.  If not, some parameter of their character file is garbled and the system can't read it.

Good luck!
Title: Re: Question about modding
Post by: superevilking on Apr 19, 2024, 10:29 PM
Thanks, its working now. Had to mess with the PD handler for the character, the head wasn't appearing but got that fixed. Now to work on getting the other parts to get going. Thanks for all the help you been giving me.
Title: Re: Question about modding
Post by: superevilking on Apr 21, 2024, 01:54 AM
Having some issues so far and can't figure out what I'm doing wrong. First problem I'm having is getting the journal for the NPC to appear, I followed a different teachers journal setup, made sure the event properties matched, and the person filters as well, but each test the character notes don't appear.

The second issue I'm dealing with is a event to start a chain. Can't seem to get it to load for the class the teacher is teaching at that moment. Looked into different events that are set to load when entering a loc w/ a NPC in it, and tried to match it, but so far nothing.

If anyone needs to see what I'm doing, I am willing to upload the coding if it helps with figuring out where I getting lost or confused on what a module does. If I can figure out how to get the event to work, I should hopefully be able to get the rest working on my own.
Title: Re: Question about modding
Post by: DeniedInMontana on Apr 21, 2024, 01:40 PM
Feel free to make a .zip or .rar file of your mod so far, and I'll take a look at it for you and see what I can figure out.  I'm a baby explorer like you, but I feel like I'm pretty good at following lines and comparing, lol!
Title: Re: Question about modding
Post by: superevilking on Apr 22, 2024, 03:08 AM
Here is a download link that contains the journal and starting chain file. I'm gonna keep working on getting other things made, and hopefully find out out to make the paper doll outfits, that or start working on either finding images or making the art for scenes.

https://mega.nz/file/ldInDZbK#Esl3YOGxBga1YGIOV9_GeaL2Yrw1ltr8AXuH3ggRsr0
Title: Re: Question about modding
Post by: DeniedInMontana on Apr 22, 2024, 11:31 AM
So these events look like they should fire - except that they have no folder structure included, so I can't see where you have them saved in the directory.  If those files are how you have them saved, they'll never fire as the game doesn't "see" them in the correct area and doesn't know what to do with it.  Please make a complete archive of the entire mod folder with all files included.  Thank you.
Title: Re: Question about modding
Post by: superevilking on Apr 22, 2024, 12:18 PM
The journal one it path is mods/mods name/events/extensionslibrary/smartphone/journal/teachers/ve.xml

The chain start is in the events/personattachment/lillypowel/ve.xlm

I will update this with a new download link when I can get to my computer.

Edit:
Here is a new download link with the full mod file, most of the file are currently empty. Will be working on having it cleaned up later once I know what files I didn't need to make.
https://mega.nz/file/YRxFyJQA#-FyAMzjDb5dBQMqFPsuRIgPplTxm_KbjwJXXBgR7TiE
Title: Re: Question about modding
Post by: DeniedInMontana on Apr 22, 2024, 04:47 PM
Ok, I've loaded the setup as you have it into the game.  Day 1, initial loading, Lilly Powel is an NPC loaded in to the population.  She can be hired in the school management panel.  However, you're going to run into a couple of conflicts event wise:

1) When she's hired, you attach PersonAttachedEvents/LillyPowel/training.ve.xml to the Player.  When she's fired, you detach that same event from her.  I recommend attaching PersonAttachedEvents/LillyPowel/LillyPowel_Chain_Start.ve.xml to her when she's hired instead.

2) The LillyPowel_Chain_Start file is saved in Classroom Shared and in PersonAttachedEvents folders.  From the base of what you were building from (The Unruly Class event), I would copy the Unruly class event to your folder with an additional check after you've helped her with the class to see if she's the teacher of that class, and then to execute a remote event to your chain start file.  Yours will override the one in the base game, while still allowing the event to fire if she's hired late game when the unruly class is less likely to fire.

3) I would add a different check in the try phase of your event, getting the average corruption of the class to compare against her authority.  This would be bypassed by the previous change to the Unruly class file, but would still allow the chain to start if that event doesn't occur.  You could also add an operation to get the connected areas to that location, in order to move her to the connected hallway of that class.

4) Always double check that folder names are spelled exactly as they are in the base game.  Your smartphone journal entry would not show up because the directory was spelled incorrectly,  ExensionLibrary instead of ExtensionLibrary.  If you have a specific schedule for her as well, you'll need to change the SceduleHandlers folder to ScheduleHandlers instead.
Title: Re: Question about modding
Post by: superevilking on Apr 22, 2024, 07:03 PM
Ah, thank you. As for the chain start being in two spots. I believe I originally had it in one of them, but copied it into the other and just forgot to delete the other.

But I will get that all fixed and give it a test, again thank you so much for the help you been giving me.
Title: Re: Question about modding
Post by: superevilking on Apr 22, 2024, 09:52 PM
Got it to work now, just running into two problems. But I should hopefully be able to figure it out. Thanks
Title: Re: Question about modding
Post by: DeniedInMontana on Apr 23, 2024, 07:14 AM
No problem, we all start somewhere.  I've been learning by going through mods and figuring out what goes where and why by example, then looking at some of the older/outdated mods and seeing what - if anything - I can do on my end to update them.  As I learn, I go back and clean up what I've done - or what was originally in the file.
Title: Re: Question about modding
Post by: superevilking on Apr 25, 2024, 12:59 AM
I tried to figure this out myself but just can't seem to find a solution. How do you get the journal to update with new notes? I looked at other characters that have notes that appear after progress with their quest and tried coping it but after so many different tests the journal doesn't update even after the the story event passes. Hopefully this will be the last question related to this mod for awhile.
Title: Re: Question about modding
Post by: DeniedInMontana on Apr 25, 2024, 07:43 AM
Quote from: superevilking on Apr 25, 2024, 12:59 AMI tried to figure this out myself but just can't seem to find a solution. How do you get the journal to update with new notes? I looked at other characters that have notes that appear after progress with their quest and tried coping it but after so many different tests the journal doesn't update even after the the story event passes. Hopefully this will be the last question related to this mod for awhile.

You have a couple of different options.  The journal as I saw it set adjusts via bits set in your chain.  However, the class event I saw does not set the bit for it to update.  Somewhere after it makes the split from help/no help, you need to right click > Base > Set Bit > attach to 1 with Variable referencing your chain, and which bit position needs to be set (in the class event, bit 0).  After which, the journal should update and show the next entry.
Title: Re: Question about modding
Post by: superevilking on Apr 27, 2024, 01:59 PM
Thanks, I got it working. Just got to update a few things on my end and hopefully the rest of the mod making will be smooth sailing. Key work being smooth.
Title: Re: Question about modding
Post by: DeniedInMontana on Apr 27, 2024, 10:48 PM
Glad it worked!  Never be afraid to ask for help, we all start somewhere.
Title: Re: Question about modding
Post by: superevilking on May 04, 2024, 02:18 PM
side question, it's unrelated to the current mod I'm working on, but I will need to know to for later ones. How to I have a new location form a connection to the current map? For example, Lexiville's slave rooms, are non-existent in the based world extension. but the moment the game is fully loaded, the appear in the world editor with a connection to the players home and then appear once built. So far I have a test world extension made, and tried to copy how lexiville has it setup but I just don't know how to have it form a path connector once the world is fully loaded. I tested it, and the game shows it exists and I event forced the player into the loc, but other then that there isn't a way to get to the room through normal means. Knowing my luck I most likely missed a step.
Title: Re: Question about modding
Post by: DeniedInMontana on May 05, 2024, 06:13 AM
Just taking a wild guess, but I'm thinking you will have to have an event that changes the event location to known or found or whatever the game uses to open new rooms.  Then you will need to make sure your location has a pathway to it from where you want to enter, as well as a pathway in your location back to your entry point.  Haven't looked personally, but that would be my guess.  Maybe look at what happens when you talk to Stacy Slutsky about opening the Cabaret and any events attached to that?
Title: Re: Question about modding
Post by: ElPresidenete on May 06, 2024, 07:10 AM
Quote from: superevilking on May 04, 2024, 02:18 PMside question, it's unrelated to the current mod I'm working on, but I will need to know to for later ones. How to I have a new location form a connection to the current map? For example, Lexiville's slave rooms, are non-existent in the based world extension. but the moment the game is fully loaded, the appear in the world editor with a connection to the players home and then appear once built. So far I have a test world extension made, and tried to copy how lexiville has it setup but I just don't know how to have it form a path connector once the world is fully loaded. I tested it, and the game shows it exists and I event forced the player into the loc, but other then that there isn't a way to get to the room through normal means. Knowing my luck I most likely missed a step.

You have to use the world editor and in the navigation tab add points where options will appear.
You'l also have to refresh/load files

https://ibb.co/PDkhbxm
Title: Re: Question about modding
Post by: superevilking on May 06, 2024, 12:28 PM
I made edits to the original based World extension, and got it to work fine there. The issue is when it comes to mods having new locations. In the mods world extension when you open it up the locations dont have a path connecting to say the school, but when the mod is active in game, that modded location now has a path to the base location.

I haven't gotten a chance to take a look at it since I made that question, but it looks a event to make it known is needed. So my claim of "Knowing my luck I most likely missed a step" is valid. I will return when I finish testing it.
Title: Re: Question about modding
Post by: superevilking on May 06, 2024, 02:48 PM
side update/issue

As for the new location in mod, tried an event to make it know and even just set it up to be known by default and even still no navigation path is made. Seeing how this was for a side mod I will deal with it later. But when it comes to the scenario that will just have its own base map so hopefully getting new locations to appear will be easier.

Anyhow, currently running into an issue with the current mod I'm working on. In the third version of the event, each trigger would only work when you entered a location with the needed NPC, which is causing issues for when I need a trigger to happen without that NPC there.

I am most likely gonna have to make a new event to get it all to work, but for know I will upload the current version to Mega for if you need to see what is there. Right now it is currently in a second version of a attempt to fix it myself.

all bit trigger points work up until number 8 where you need to be in your office. Before that in the original one, you had to go to where Lilly was to get that bit trigger to work.

MEGA: https://mega.nz/file/9NQ1hboK#v8ERgL_wiDVgKY0pMdMlJpLnHT3_MrGCK4BH1t2VzUg

Now back to trying to get Kisekae to work, before trying to find a different way to make the paper doll stuff.