News:

Please request registration email again and then check your "Spam" folder

Former www.henthighschool.com

Question about modding

Started by superevilking, Apr 17, 2024, 12:58 AM

Previous topic - Next topic

superevilkingTopic starter

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.

DeniedInMontana

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. 
  • To add the gate you're looking for, you'll need an object list of all people currently in the room.
  • Then you'll want to {object list: filter} that list by student/non-student (teacher), with an object list for both.
  • Next, use a math function to get the average lust and corruption of the student list.
  • Finally, get the teacher's authority stat.
  • Once you've got all that, you have what you need to {switch by integer range} for whichever stat has the most restrictive break - I'd assume the students' corruption (slow to build) or lust (quicker to build) level.  Remember that you can double click the box on this operation to add more link options - it will go by less than the first number entered, then less than the second, and so on until your last number which will be greater than or equal to.
  • From there, build out each link option to a desired action ({Compare integer} to teacher's authority vs whatever limit break you want?  Right click the operation to change the exit links to what you will use - anything left empty before your active exit link can cause the operation to end prematurely.)
  • Also remember that you can have multiple paths INTO an operation, but it is bad form and confusing to have multiple paths OUT of the same exit link.  You'll end up having several things happening at the same time, and if any of them are affected by the others can cause errors.

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.

superevilkingTopic starter

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.

superevilkingTopic starter

Started working on a Mod, heavily going off of both the guide and pre-existing events to build what I need.

superevilkingTopic starter

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.

DeniedInMontana

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!

superevilkingTopic starter

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.

superevilkingTopic starter

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.

DeniedInMontana

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!

superevilkingTopic starter

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

DeniedInMontana

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.

superevilkingTopic starter

#11
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

DeniedInMontana

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.

superevilkingTopic starter

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.

superevilkingTopic starter

Got it to work now, just running into two problems. But I should hopefully be able to figure it out. Thanks