Oni Central Forum

A forum for the Oni community

You are not logged in.

#1 01/27/19 20:01

Lizardizzle
Member
From: California, USA
Registered: 05/29/15

Oni Randomizer Mod development discussion

EDIT: The mod is in an operable, non-crashing state and does behave as randomly as I can get it. Best used with vanilla Oni (bug fixes, animation changes, effects, misc. scripts are fine) It might do weird things with mods that add characters to default levels. It also won't work with mods that replace default characters entirely. If a mod replaces animations or textures (replacing model model? Less sure there) It will function just fine.  If you want to try it out, here's a link to the .zip file!

V1.1 - mega.nz/#!wIVRlSjS!zQxdK5yEHJn6EQadVz9OE4QNyqsLz1TlWx9mg78OwhI

This thread is all discussion on the beginnings of this mod's development and my attempt to improve it further. I hope it becomes something great.

Current kinks being worked out:

Changing player spawn to favor stronger characters. Some levels give you a higher chance of spawning as a weak character. Prepare to die. (FIXED WITH V1.1)

Changing the mod from .oni replacements to a patch mod to be more friendly towards other mods.

Allow RandomCostume flag to support ONCC links greater than 25.

Hi! If you're reading this, and want a TL;DR, then have this: "I want to create a mod that when loading Syndicate Warehouse, that first enemy that spawns below is created as a Striker. Where do I start? If that's possible, can you make that Striker be a random enemy?"

Further info as to why I want to change a single enemy spawn from a warehouse goon to a Striker is below.

I've become inspired by mods for various games recently that feature enemy and item spawns that are completely random from what they should be. Games like Dark Souls and Zelda games have had mods like this made for them, and imagined a mod for Oni that could potentially be interesting.

My hope is to understand the spawn system in the base game for enemy placements and create a mod that can place a random enemy at each previously existing spawn location. I've started by looking at the "Collection of tutorials, resources for modding, scripting, etc" stickied post and looking at pages on the wiki such as "Category:Oni binary data docs", "OBD:BINA/OBJC/CHAR", and "OBD:AISA" But am unsure as to how to start.

I can imagine how to make this as simple a start as possible for me: Create a mod that when loading Syndicate Warehouse, that first enemy that spawns below is created as a Striker. If I can learn that, then making that Striker instead spawn as a random character would be the next step. If it's impossible, then I at least know I can give up. If it is possible, then I'd be willing to continue.

Potential roadblocks in the project, assuming a character can be created as a random enemy, would be knowing if I'd have to manually adjust every enemy spawn in the game to the random spawn. I'd hope there'd be a way to tell the game "If there's an AI spawned anywhere, make it a random AI."

I want to start as small as possible and learn on my own as best I can. I hope this isn't a burdensome project to present here. I can see myself enjoying this mod to its full potential though. Running through the game against random enemy/friendly spawns with random weapons in their hands if they would usually spawn with a weapon, and then also having items that spawn on the floor also be called in as random other items. Truly a hectic experience.

Last edited by Lizardizzle (02/02/19 19:02)

Offline

#2 01/28/19 05:01

s10k
Member
Registered: 01/14/07
Website

Re: Oni Randomizer Mod development discussion

Hi Lizardizzle,

I believe it should be possible. I have done something similar in my personal project "Omega Tournament" (not yet released).

You will need to use a combination of scripting with Trigger Volumes.

The idea is to create a random function where you can get a random number at a time, and with that random number pickup the character class, weapons to spawn, item to spawn etc.

The trigger volumes would be used to pick the current random number (let me know if you need more information on this).

You may also want to add new flags to the level itself so you can spawn items in different locations than the pre-existing ones.

In Omega Tournament I have used a peculiarity in the BSL function chr_main_class to get a random character for our main character.

"If you provide an index > than the available number of characters (nc), the engine will automatically subtract the number of characters how many times as needed to find a proper character index. For instance if you have nc = 85 and you input chr_main_class(180), the engine will change your class to the index 10 (180-85-85)"

So if you pass a random number to this function you should get a random character. The thing is this function is only for the main character, not sure if this also works with chr_set_class (which applies to all characters), you need to check. Other problem that I see with this approach is that you need to know the id number for the character that can change during different plays so it may troublesome to use.

Other option that I see (and probably is way easier than involve with scripting for random characters) is to create a new character that has a lot of different variants:
https://wiki.oni2.net/XML:ONCV

This way you would only need to define the variants that you would like to see randomized and spawn this "new character" that would pick up a variant automatically.

Samer's tutorial in characters can be helpful here:
http://oni.bungie.org/forum/viewtopic.php?id=2423

\Edit

You have even other option. You can make a custom program that create "random AEI files", this way you can make the randomness happen at "compile time" instead of "run time". What I mean is that this custom external program would generate the random files before being installed by the AE Installer. If you know a bit of programming it should be easy to accomplish.

The only downside with this approach is that you would need to install the mod each time you wanted a new random version.

Last edited by s10k (01/28/19 05:01)

Offline

#3 01/29/19 01:01

Lizardizzle
Member
From: California, USA
Registered: 05/29/15

Re: Oni Randomizer Mod development discussion

Thanks for all the ideas! I really appreciate it.

Your second solution ("create a new character that has a lot of different variants") seems the most possible in my early thought process, so I did some studying and used vagogui to look at various files.

The most useful page in my further research seems to come from the "OBD:ONCV" page on the wiki. I've found that the "randomcostume" flag in BINACJBOCharacter.oni isn't a feasible solution, as I'd have to change every character that is in each level's file to have that flag, and unless there's a way I can make a program go through them all and find the right line and add that in for me, I'm certainly not going to do it manually.

However, Note 3 in the OBD:ONCV page talks about something interesting that I can't quite understand, pertaining to the "<ParentVariant>ONCV'x'</ParentVariant>" in an ONCV file. it says

"Inter-ONCV linking can serve the same purpose : in notes 1.3 and 2.4 above, any ONCC linking to the ONCV via another ONCV could also be selected.
In order to play with that, however, you have to rename a level's ONCV, because originally, only the less general ones are included (not striker.ONCV or any.ONCV)"

Is there any logic to changing every (at least, enemy) ONCC file to link to a single ONCV file that is a "new" character with every other varient of ONCV file linked to it? Would doing so make the game choose a random ONCV variant every time an a ONCC is spawned?

I'm not sure if my lingo is correct and I hope my thoughts are even understandable. I am barely understanding myself, but I think I'm improving bit by bit.

edit: I'm having a fun time now that I've dug in and succeeded in making the game crash after starting to see things work.

I managed to get all of level1_Final to have "RandomCostume" in the BINACJBOCharacter.oni flags with hefty use of the find and replace command in Notepad++ and lots of Google searching. Loaded up the warehouse and was pleasantly surprised to see a differently dressed Konoko, Kerr, and thugs every time I loaded the level! Minor success!

This seemed to be from the ONCCs being called by BINACJBOCharacter to each have multiple different ONCV variants linked to them, and shuffled about with the RandomCostume flag just like you said. However, I tried editing all (ALL) of the ONCC files from level0_Final to link to one ONCV file (I tried ONCVany, ONCVstriker, and even created an ONCVrandom and added it to the ONVLvariant_list file) but upon loading the warehouse, the game gave the classic "blam, oni crashed." screen.

Do I need to adjust something in the ONCV files to get them to work nicely? Am I missing something with the ONCC variant choice? Does the "ParentVariant" flag in ONCV files matter in this project?

Last edited by Lizardizzle (01/29/19 03:01)

Offline

#4 01/29/19 05:01

s10k
Member
Registered: 01/14/07
Website

Re: Oni Randomizer Mod development discussion

I am not really familiar with the ONCV structure (I am actually still learning, especially for my custom level).

I've found that the "randomcostume" flag in BINACJBOCharacter.oni isn't a feasible solution, as I'd have to change every character that is in each level's file to have that flag, and unless there's a way I can make a program go through them all and find the right line and add that in for me, I'm certainly not going to do it manually.

You can do that easily with XmlTools, XmlTools is included with Vago and even has a GUI there that can help you quickly get the changes that you want to the XML file.

You can use the XmlTools GUI to preview the command before actually apply to the xml file.

I would say that a combination of the --add-values and --remove-values should be enough for this. You first use --remove-values to remove all the "randomcostume" flags (if there are any), then you apply the --add-values to add "randomcostume" flag to all characters. Examples here.

Make sure when you need to make lots of common changes to XML you first have a look at it, instead of doing all the changes manually (it saves lots of work and time).

is there any logic to changing every (at least, enemy) ONCC file to link to a single ONCV file that is a "new" character with every other varient of ONCV file linked to it? Would doing so make the game choose a random ONCV variant every time an a ONCC is spawned?

I think so, I think that's the way to do it, you need to change every ONCC to link to a ONCV that contains all the random characters that you want, you also need to to add the flag "randomcostume" to BINACJBOCharacter so it will be pick a random one I believe.

You could also change the existing ONCV I believe, and just add there the characters classes that you want to get randomized.

Do I need to adjust something in the ONCV files to get them to work nicely?

Maybe, I am not entirely sure. I will need to check how I did in my level to get ONCV to work. You definitively need to add the new ONCV to level0's ONVL.

Maybe it can helpful if you can share what you got so far with us, so we can have a look at what is causing the crash.

Offline

#5 01/29/19 14:01

Lizardizzle
Member
From: California, USA
Registered: 05/29/15

Re: Oni Randomizer Mod development discussion

I wasn't aware of XmlTools, awesome.

I tried to follow the --remove-values example with Level1_Final's BINACJBOCharacter.xml CHAR Id="3860" Konoko to remove the "NotInitiallyPresent" flag, but the preview and the applied operation show the program highlighting thousands of seemingly random parts of the XML file and deleting them instead of just removing the NotInitiallyPresent flag

The XmlTools Operation Command is this:

XmlTools --remove-values --current-val "NotInitiallyPresent" --xpath-expression "/Oni/Objects/CHAR[@Id='3860']/OSD/Flags" --files "C:/Users/coffm/Desktop/SSD Desktop Folders/Games/OniAnniversary/Oni/AE/Tools/VagoGUI/VagoWorkspace/XML/ONI - XML/BINACJBOCharacter.xml"

And the command in the wiki that I followed is this:

XmlTools --remove-values --current-val "UpgradeDifficulty InfiniteAmmo" --xpath-expression "/Oni/Objects/CHAR[@Id='7643']/OSD/Flags" --files "BINACJBOCharacter.xml"

The only difference I see is my file path, but it's able to import it fine, so I'm not sure what the issue is.

This is BINACJBOCharacter before using XMLTools:

<?xml version="1.0" encoding="utf-8"?>
<Oni>
    <Objects>
        <CHAR Id="3860">
            <Header>
                <Flags></Flags>
                <Position>-543.22 159 -630.0954</Position>
                <Rotation>0 180 0</Rotation>
            </Header>
            <OSD>
                <Flags>NotInitiallyPresent</Flags>
                <Class>konoko_generic</Class>
                <Name>konoko</Name>
                <Weapon>w1_tap</Weapon>
                <Scripts>
                    <Spawn></Spawn>
                    <Die>you_lose</Die>
                    <Combat></Combat>
                    <Alarm></Alarm>
                    <Hurt></Hurt>
                    <Defeated></Defeated>
                    <OutOfAmmo></OutOfAmmo>
                    <NoPath></NoPath>

After running the command, it looks like this, and I don't know why.

<?xml version="1.0"?>
<Oni>
	<Objects>
		<CHAR Id="3860">
			<Header>
				<Flags />
				<Position>-543.22 159 -630.0954</Position>
				<Rotation>0 180 0</Rotation>
			</Header>
			<OSD>
				<Flags></Flags>
				<Class>konoko_generic</Class>
				<Name>konoko</Name>
				<Weapon>w1_tap</Weapon>
				<Scripts>
					<Spawn />
					<Die>you_lose</Die>
					<Combat />
					<Alarm />
					<Hurt />
					<Defeated />
					<OutOfAmmo />
					<NoPath />

It looks like this throughout the entire file, even for CHAR Ids that I didn't put in the command

Offline

#6 01/29/19 16:01

s10k
Member
Registered: 01/14/07
Website

Re: Oni Randomizer Mod development discussion

That's strange I tried to reproduce your problem but I couldn't my command was:

XmlTools --remove-values --current-val "NotInitiallyPresent" --xpath-expression "/Oni/Objects/CHAR[@Id='2989']/OSD/Flags" --files "C:/games/Oni/AE/Tools/VagoGUI/VagoWorkspace/XML/ONI - XML/BINACJBOCharacter.xml"

And it works ok, only CHAR id = 2989 "NotInitiallyPresent" flag gets removed.

The file that I am using is this one:
http://script10k.oni2.net/onibungieforu … racter.xml

Please note that you have two Flags elements one in Header element (that's usually empty) and one in OSD element, make sure you are looking at the OSD ones.

but the preview and the applied operation show the program highlighting thousands of seemingly random parts of the XML file

I believe that's because the XML gets reformatted by XML tools (it changes the spaces and close tags) but if you look closely it should have actually no changes in the data.

Last edited by s10k (01/29/19 16:01)

Offline

#7 01/29/19 20:01

Lizardizzle
Member
From: California, USA
Registered: 05/29/15

Re: Oni Randomizer Mod development discussion

Ah, okay, the formatting doesn't matter. With that knowledge, I've made a lot of progress! I changed every ONCC file to point to ONCVKonoko and chose some other ONCC files to put into the mod (All the Konoko ONCCs and all the Elite ONCCs), and also changed every Level#_Final/BINACJBOCharacter.oni file to place RandomCostume in every character spawn.

It worked, and now when I load a level, Konoko is randomly changed to another outfit or into an Elite. I loaded the last level and ran around as an elite and came across an Elite that spawned as a Konoko! The Elites randomly select from the pool of Elite and Konoko variants in the mod that I installed.

I changed every ONCC file to say ONCVKonoko in it, then shoved all of them into the mod as well, hoping that my job was done. Of course, things never go that smoothly.

It seems that at a certain NUMBER of ONCC files linked to one ONCV variant, the game crashes upon level load. I tried putting all the Konoko, Elite, and Thug ONCC files into the mod, and whenever I'd cross a certain threshhold of ONCC files, the game would crash. I also tried selecting a wide variety of ONCC files instead and that worked until the number of ONCC files was too big as well. I thought that maybe a certain kind of ONCC file could crash it, but even with absurd things like giant Shinatamas, Mukades, and civillians chosen in the pool, it never crashed until I made the number of ONCC files too large.

I'm unsure if there's any way around this, or if I have to go back to square 1 and do the random calls another way and avoid the RandomCostume flag entirely.

Should I upload the package files here? How do I go about doing that?

Edit: I've found that 25 ONCCs called by the RandomCostume seems to be the max number. Any more and it crashes on level load. There are 123 ONCC files to be chosen from, so I guess one solution is to have 5 groups of 25 ONCCs that call for 5 different ONCV files. Hopefully I can split those groups up in a way that keeps things as random as I can.

Last edited by Lizardizzle (01/29/19 22:01)

Offline

#8 01/30/19 03:01

s10k
Member
Registered: 01/14/07
Website

Re: Oni Randomizer Mod development discussion

That's interesting I was not aware of these limitations. We should probably document them. Maybe you could create a wiki account and add these information?

There are 123 ONCC files to be chosen from, so I guess one solution is to have 5 groups of 25 ONCCs that call for 5 different ONCV files.

Indeed that could be a solution.

You could also give option 1 a try, but that may be even more complicated because chr_set_class uses an char id instead of string that can change in different game runs.

I think if you can't get it work properly with XML modding alone, the 3th options is probably the more feasible one, you can create a script in python (or in any other language of your choice) that generates the .xml files randomly at each run, bundling them in a AEI package. This way you would not have any limitation in the randomness, you would only need to do a install every time you would want a new fresh gameplay.

You could even randomize the amount of health, weapons. ammo etc of each character, the positions for existing characters / items / weapons the possibilities with this option are endless.

\Edit

I see even other possibility similar to the option 3 (custom external program). You can create a XML patch using the XML Custom Code feature:
https://wiki.oni2.net/XmlTools/Full_doc … USTOM_CODE

With that you can program the random changes directly in javascript and the AEI will run them automatically in each mod reinstall, with this option you can easily randomize the entire game levels.

Reading about XML patching modding can be helpful here:
https://wiki.oni2.net/Making_a_patch_mod

You still need to know javascript to do it this way.

The only disadvantage that I see with this option is that you will not be able to easy share a specific generated instance of the level(s). You would need to extract the files from the .oni files, with option 3 (external program) you can generate the specific random instances AEI packages and easily share them with the community, not sure if this's relevant.

Last edited by s10k (01/30/19 03:01)

Offline

#9 01/30/19 22:01

Lizardizzle
Member
From: California, USA
Registered: 05/29/15

Re: Oni Randomizer Mod development discussion

I've made great success! It's playable through all levels now, every character spawn gets changed every level load, and the randomness is about as good as I can get it with 5 groups of 25 for all 123 ONCC files.

As it is now, I'd like to release it to the mod depot for everyone to try. I played it for hours yesterday and had a blast. I'm not sure how to go about that though. I have the mod package and .zip file ready. I don't have a Mod Depot account. I'll do what I can before I do.

Offline

#10 01/30/19 22:01

Iritscen
Moderator
From: NC, USA
Registered: 10/22/07

Re: Oni Randomizer Mod development discussion

Oh hey, I wasn't watching the forum closely so I didn't see this discussion.  Your mod sounds interesting!  Typically I only create Depot accounts for people who have made multiple mods, but if you want to upload the zipped mod package to a file sharing site, I can upload it to the Depot with you credited as the creator.  You could also email it to me at [my user name]@yahoo.com.


Check out the Anniversary Edition Seven at ae.oni2.net!

Offline

#11 01/30/19 23:01

Lizardizzle
Member
From: California, USA
Registered: 05/29/15

Re: Oni Randomizer Mod development discussion

Hey, Iritscen! I'm glad you came around just now, as I was setting up a Mega.nz upload as I got the email that you made a reply.

mega.nz/#!ZENAyQqY!XlqompZrd1Hwn0Xkv8nqpI3BKmh2m1FL16Ql-OuZ1fc

I chose the package number of 21900. I chose 2xxxx because it changes all character ONCC files (Will other character ONCC mods that change base character textures/models/animations create problems with my mod?). I chose 21xxx because 22xxx is Sam's Mega Pack which changes the entire way the game is played and 21xxx has mods that changes base gameplay like Brutal AI that effect the whole game. I chose 219xx because that puts it between the mega pack and Brutal AI. I see both of those mods as "total conversions" and I think that this randomizer mod is similar.

Let me know if you think the ID should be different, and yes please do upload it to the depot and credit me. I'm excited!

Another question- should I make a new post to release this mod? I suppose I could just edit the post title here and edit reply #1 with the mod depot link later. On second thought, that's probably the best idea.

Offline

#12 01/31/19 03:01

s10k
Member
Registered: 01/14/07
Website

Re: Oni Randomizer Mod development discussion

Very nice I will try your mod soon, sounds fun!

Another question- should I make a new post to release this mod?

I think that is ok, you can create one for the release and continue to use this one for new ideas or improvements (if you still want to do something). This one can also serve as information to other people that are looking to do something similar.

chose 2xxxx because it changes all character ONCC files (Will other character ONCC mods that change base character textures/models/animations create problems with my mod?)

It is very likely that any mod that replaces the ONCC and BINACJBOCharacter for their own will break your mod (or vice-versa).

I think you can avoid that easily if you convert your mod from .oni files to .patch files. See here.

Offline

#13 01/31/19 11:01

Iritscen
Moderator
From: NC, USA
Registered: 10/22/07

Re: Oni Randomizer Mod development discussion

I got your mod and am taking a look at it before uploading.  I think the number you chose is fine.  I'm not sure if making it a patch mod is desirable because of the systematic way that your mod would be changing any scripted scenario.  But it does seem like it would be easy to make it a patch mod, if you wanted to try it and see how it interacts with big scenarios in other mods.  Besides the documentation s10k linked to, you can learn from patch mods like Glass-Breaking Moves and Disarm Revamp.


Check out the Anniversary Edition Seven at ae.oni2.net!

Offline

#14 01/31/19 15:01

Lizardizzle
Member
From: California, USA
Registered: 05/29/15

Re: Oni Randomizer Mod development discussion

My workweek has started again, so I'll check out making the mod a patch later in the week. It sounds like a really good way to do it.

Offline

#15 01/31/19 17:01

Iritscen
Moderator
From: NC, USA
Registered: 10/22/07

Re: Oni Randomizer Mod development discussion

The interesting thing about a patch mod is that it will patch the highest-numbered .oni file, so the ONCCs and CJBOChars in the highest mod will be patched, affecting anything the user installs.

A patch mod could modify all ONCCs using a file called "ONCC-.oni-patch" which contained a series of commands like:

@COMMAND Options "--replace-value --current-val 'ONCVdoctormale' --new-val 'ONCVkonoko' --element-name 'Variant'"
@COMMAND Options "--replace-value --current-val 'ONCVtanker_easy' --new-val 'ONCVcomguy' --element-name 'Variant'"
etc.

...and then any time it actually found "current-val" it would replace it with new-val.  Correct me if I've made a mistake in syntax, s10k.

You could even account for new characters made by Samer and others if you wanted, by adding rules for those ONCVs too.


Check out the Anniversary Edition Seven at ae.oni2.net!

Offline

#16 01/31/19 21:01

Lizardizzle
Member
From: California, USA
Registered: 05/29/15

Re: Oni Randomizer Mod development discussion

My imagination is running wild imagining the mod being able to automatically shove added characters from other mods into the ONCC variant pool. I've always liked seeing all those new character mods, but would find it interesting to fight them within levels of the game.

Unfortunately I can't imagine a good way to make that a reality until perhaps we discover why the game crashes if the ONCC pool for RandomCostume is greater than 25.

In order for this mod to work in a semi-random fashion with that limitation, I had to manually divide all the ONCC files into the 5 groups so that every type of fighter had a semi-equal chance of spawning in each group.

5groups

I intentionally weighted group 1 to be smaller and include all of the boss characters and one of each hard enemy (and the mad bomber because it's a funny looking character to see in cutscenes) with the intent of making the player always spawn from group 1 and have a better chance of being a strong character. I'm thinking of reorganizing these groups and adjusting all the BINACJBOCharacter files to ensure that the player always spawns into group 1 (Each level calls for a different Konoko, and every group has at least one Konoko in it, so in some levels you end up in groups like group 5 which has several thugs and generic males/females and scientists. TCTF headquarters 1 turned out to be one such level that I died over and over in just the first fight because I was almost always a thug with a tiny health bar vs at least 1 or more Konokos + every other enemy. It was fun, but not what I intended.

Getting back to making the mod automatically throw new mod characters into the pool, there's no real way of adding them in because every group is already full, and making more groups would just reduce the randomness further, I think.

S10K's idea with trigger volumes and chr_set_class sounds interesting, but I wasn't able to really figure out how to use it or if it can do the random number thing.

S10K's other good idea is something that I understand even less, but hey, I've made it this far, I'm sure I can learn new things as long as they're possible.

Back to the group size of 25, is there a way to see a log or study what sort of programming/calculation/structure the game is doing during the level loading that makes it crash? It doesn't seem to be from loading more types of enemies than would usually be in one level. It's like the calculation for "This ONCC is requesting to spawn with RandomOutfit. Checking ONCV. Found ONCC link #1. #2... #25. #26*CRASH*" passes a limit and it just can't be done anymore.

Sorry for the mess of thoughts. I had some time at work to think of things as I worked and came up with ideas and threw them at my keyboard once I got home.

Offline

#17 02/01/19 00:02

Iritscen
Moderator
From: NC, USA
Registered: 10/22/07

Re: Oni Randomizer Mod development discussion

Honestly, I kind of figured that you would just create another group of characters to accommodate the characters belonging to other mods.  I wasn't thinking about balance within groups.  But I don't really know how those scenarios' creators would feel if you scrambled all their carefully-placed characters anyway :-)  To make matters more complicated, you are randomizing the player character, which will probably make a lot of scripted mods almost unwinnable since they are usually pretty hard even playing as Konoko.  It might be argued that you should mark your mod as incompatible with the mods which use custom characters.  Then you won't have to worry about the player spawning as a Thug in some new level and having to fight BGI Hammer or Combustion Man or something else crazy.

P.S.: Are you sure that the limit is 25?  That's an odd number from a programming standpoint.  A more normal limit would be 32, being a power of two.  Have you tried 26 ONCV links?  30?  31?


Check out the Anniversary Edition Seven at ae.oni2.net!

Offline

#18 02/01/19 00:02

Lizardizzle
Member
From: California, USA
Registered: 05/29/15

Re: Oni Randomizer Mod development discussion

Yeah, the balance within the groups is the only thing that makes it random. Spreading the multiple hard/medium/easy characters and the multiple retextures of basic scientists/thugs/civilians is easy, but there are more unique characters that would serve the mod better to be available for every group, like the training robot, Griffin, Muro, Mad Bomber (Who will still blow up if he happens to get called in), and Tiny Striker.

Is it possible to "layer" the RandomCostume pools? Like, instead of having 6 different thugs in a group of 25, just have one thug in the main group, then when it rolls the one thug, it goes to another group and draws from the variety of thugs? Something like this:

BINACJBOCharacter calls for ONCCStriker(RandomCostume flagged to ONCV1) - Draws ONCCThug1(RandomCostume flagged to ONCVThugVariety) - Draws ONCCThug24 - Spawns ONCCThug1

In this case, the ONCC pools can be split to just enemy types instead of including all of them. This could be done for character difficulty types as well. This would all lower the number of ONCC files linked to a single RandomUniform ONCV variety pool.

S10K mentioned making a brand new character that has many varieties linked to it. Is that a possibility? Create a character who's only sole purpose is to be a link to the other characters it could be?

s10k wrote:

Other option that I see (and probably is way easier than involve with scripting for random characters) is to create a new character that has a lot of different variants:
https://wiki.oni2.net/XML:ONCV

This way you would only need to define the variants that you would like to see randomized and spawn this "new character" that would pick up a variant automatically.

Maybe I've already done that by linking all the ONCC files to the 5 groups though.

That really does leave that 25 ONCC limit, and yeah, it confuses me too as to why it's strictly 25 and not some more important multiple of 2 that you'd expect.

When I was first starting, I gave the konoko in Warehouse RandomCostume and linked all the other Konoko ONCC variants to that ONCV (Am I saying that right? Whatever I did, it was right, even if I'm getting wording wrong)

I spawned in to the level as a random variant of Konoko, so I just added the link to the rest of the ONCCs as well and shoved the mod together, expecting to spawn in as any ONCC upon loading, except it crashed. I tried several different combinations of ONCCs and eventually just chose all of Konoko's Variants and all of the Thug variants, which was 32 ONCC files linked to one ONCV. Every crash, I would remove a clump of ONCC files from the package, reinstall, and load again. (the solid state drive came in handy). Eventually I was just below 25 and it was working, so I added one ONCC at a time until it crashed at 25.

With All Konoko variants and some Thug variants, I was concerned that maybe it was because of the type of ONCC files that were being loaded, so I selected 25 completely different ONCC files that weren't Konoko or thugs. It still loaded fine at 25 until I added another random ONCC to make 26. Every other number below 25 also worked fine, not even strictly multiples of 5. 21 works just as well as 22 or 9. It's very odd.

I tried looking around the game's text logs and debug launch commands after it would crash but couldn't find anything useful. I don't have much knowledge on that aspect though. Not sure if there's something I should do to get info on the crash since it's so replicable.

Offline

#19 02/01/19 14:02

Iritscen
Moderator
From: NC, USA
Registered: 10/22/07

Re: Oni Randomizer Mod development discussion

Okay, well I guess it's 25 then!  Since it's a hardcoded limit, there's not much benefit in trying to get more info on the problem.  You'll just have to use the groups approach.

I'm a little confused by your other question.  Could it be that you're looking for the ability to group some ONCVs (which are groups of ONCCs) under a parent ONCV?  See Note 3 on https://wiki.oni2.net/OBD:ONCV for a possible approach.


Check out the Anniversary Edition Seven at ae.oni2.net!

Offline

#20 02/02/19 13:02

Lizardizzle
Member
From: California, USA
Registered: 05/29/15

Re: Oni Randomizer Mod development discussion

I've succeeded in adjusting the 5 groups for V1.1! It crashed after I redid everything because I accidentally made ONCVkonoko into ONCVKonoko in some of the ONCC files. I guess they're case sensitive. Isn't that just the way modding goes. Work for hours carefully redoing stuff, then it crashes, and then you redo it twice and it still crashes.

mega.nz/#!wIVRlSjS!zQxdK5yEHJn6EQadVz9OE4QNyqsLz1TlWx9mg78OwhI

I'd prefer to just replace the one I've linked to you before with the new one. It's essentially the same for now, except more like what I intended from the beginning.

Now, instead of each level placing the player into a different random pool, each level puts the player in Group 1, which contains 3 Konoko types, the bosses, 1 of each hard difficulty enemy, and a bit of variety. The rest of the 4 groups are mostly the same, except one of the groups used to have 2 konokos in it, now there's only 1. In V1.0, there were definitely too many Konokos running around. At least now it's "Kinda" rarer. TCTF Headquarters level now doesn't have a ~50% chance of you playing as a civilian or a thug and dying instantly!

Gotta go to work now, glad I got this one problem looked at. Still need to make the mod a patch and hopefully solve the 5 groups thing entirely with more study into how ONCVs work.

Note 3 on that ONCV page is one that I had read before and I don't really understand what it means by "Inter-ONCV linking" . I also don't understand what point "01689-konoko.ONCV links to 01666-any.ONCV, which links into nothingness." is trying to make. Note 3 doesn't relate to RandomCostume or UpgradeDifficulty right?

Offline

#21 02/02/19 16:02

Iritscen
Moderator
From: NC, USA
Registered: 10/22/07

Re: Oni Randomizer Mod development discussion

Okay, I downloaded your v1.1 package.  I see you fixed the capitalization on the level folders too, thanks :-)  It's always better to assume that a system is case-sensitive than not, because it's easier for code to be case-sensitive than it is to allow for differences in case.

Anyway, just to be clear, I didn't upload your package yet because I wanted to wait and see if you planned to make it a patch mod.  Otherwise, with the types of files you're replacing, it should really be marked as incompatible with other mods that contain those files.

As for Note 3, it's saying that ONCVs exist in a hierarchy.  For instance, there are three easy Strikers in Oni (see here for pictures), so each one has an ONCC: ONCCstriker_easy1, _easy2, and _easy3.  Each of those has ONCVstriker_easy assigned to it.  So when BWest wanted an easy Striker somewhere, they didn't have to pick one guy out of the three; they could simply assign the RandomCostume flag to all easy Strikers in the level and they would then randomly have each of the three variants.  However, ONCVstriker_easy itself has ONCVstriker assigned to it.  Barabas, comguys, and other enemies also fall under this ONCV, so if you assigned an ONCC to ONCVstriker and gave specific CHARs with that ONCC the RandomCostume flag, you'd potentially get any of those characters spawning.

Another interesting hierarchy is ONCVkonoko, which contains all Konokos, Shinatama, female cops, and Furies.  ONCVkonoko links to ONCVany.  The only other ONCV that links to ONCVany is ONCVirondemon, so attaching ONCVany to an ONCC directly and then spawning one with RandomCostume will give you either Konoko, a Fury, Shinny, Karen, or the Iron Demon (assuming it actually exists in the game data).  At least, that's what I gather from looking at ONCCs and ONCVs, not having actually tried it.


Check out the Anniversary Edition Seven at ae.oni2.net!

Offline

#22 02/02/19 19:02

Lizardizzle
Member
From: California, USA
Registered: 05/29/15

Re: Oni Randomizer Mod development discussion

Lunch time from work! Yes, my next goal is to look into making it a patch mod. I'll post here if I have any troubles. I'm sure there's more than enough help in this thread and in the wiki to get me started. I'll see what I can do.

If it's a patch mod, then it would be able to work with mods that add new characters and spawn them wherever the character mod's creator wanted them, right? That would be what I would want, I think.

Offline

#23 02/02/19 19:02

Iritscen
Moderator
From: NC, USA
Registered: 10/22/07

Re: Oni Randomizer Mod development discussion

Even as a patch mod, it wouldn't automatically work with new characters, because you are changing specific ONCVs to new hand-selected ONCVs — unless you also get the names of the custom character classes and incorporate those into a patch like the one I described in post #15.


Check out the Anniversary Edition Seven at ae.oni2.net!

Offline

#24 09/10/19 02:09

s10k
Member
Registered: 01/14/07
Website

Re: Oni Randomizer Mod development discussion

I think we should upload this mod to mod depot anyway. It seems like an interesting mod... Maybe somebody can even improve it further (there lots of good suggestions above, going further to randomize other things than characters, or simply convert it to a patch mod).

Maybe we can upload it as a simple zip, without mod number of something like that, so it does not show up by default in AEI?

Offline

#25 09/10/19 07:09

Iritscen
Moderator
From: NC, USA
Registered: 10/22/07

Re: Oni Randomizer Mod development discussion

I've uploaded it to the Depot under the "OniSplit import" install method in order to avoid using "Package": http://mods.oni2.net/node/362.  I'm not sure what happens if a package has no package number, as that's never been done before, so this is a safer approach.  If the mod is later marked as incompatible with all the other character mods, or is converted to a patch mod, then its install method can simply be switched to Package and it can be given the number 21900 as Lizardizzle planned, and it will then show up in the AEI.  For now I guess we'll treat it more as a neat proof-of-concept, like some of paradox's non-AE experimental mods.

Note that I changed the mod's name slightly to "Character Randomizer", because it was titled "Randomizer Mod" and I felt that the first word was too vague on its own and the second word was redundant.


Check out the Anniversary Edition Seven at ae.oni2.net!

Offline

Board footer

Powered by FluxBB