Modifications to Chaos

If you're having a problem with any of the UT versions of Chaos, post here for help.
Post Reply
coopdvi1
Posts: 26
Joined: Sun Jan 22, 2006 9:34 am

Modifications to Chaos

Post by coopdvi1 »

I wanted to make some changes to Chaos--nothing major, just things I can't find a mutator to do. We only want to play on a LAN (five computers in one room), so I don't mind making changes to all of the computers; I'm just a little stuck.

A) I want to turn down the sould effect volume on the grapple hook.
B) I want to set the default ERDW ammo to 12 instead of 6, and the ERDW ammo pickup to 12 instead of 6.
C) I want to set the maximum number of spider mines to x (which I've done with a mutator), but have it show up on the client's HUDs.
D) I want to set the maximum health to x (which I've done with a mutator), but have it show up on the client's HUDs.
E) I want to set the maximum shield to x (which I've done with a mutator), but have it show up on the client's HUDs.

I don't know squat about scripting, but through mindless reading I've found the packages to decompile (ChaosGames.u, ChaosUT.u, Engine.u, xGame.u), and the .uc files that have the settings I want to change. Problem is, I can't recompile the packages: ucc says I'm missing files. We don't play with anyone else, so we don't mind editing the stock UT and Chaos packages beyond recognition; we just want to get it to work.

Can you guys help us out?

SJC
Dorian_Old
Posts: 53
Joined: Wed Oct 31, 2007 2:14 am

Post by Dorian_Old »

Well like R.Flagg has been saying on here for a while, anyone who knows much about coding at all isn't coming on this board anymore. Have you tried the unrealwiki? By the way, nevermind about what kind of server you play on ... I asked in that other thread.
Dorian_Old
Posts: 53
Joined: Wed Oct 31, 2007 2:14 am

Post by Dorian_Old »

Actually I can help a little in rambles, then maybe you can look on the unrealwiki to piece together what I describe (even though the wiki is pieces itself). In almost every scripting language, code is extended ... you don't just take an existing package and recompile it. That's actually one of the number one rules in coding, so to speak ... and it prevents Chaos (the bad kind) for online play when a player joins one server with one version of one package and then another server with an earlier or later version (mismatch). I know true online play isn't what you're interested in, but that's a big important rule. Sounds like you need to make a mutator of your own that changes defaultproperties of some of those things. About the HUD ... there's entirely separate HUD code I think. Yeah a mutator is technically gamerules code. So sounds like you need to figure out how to make a mutator and call it whatever you want (like mychaosrules extends mutator, in the first line of the code) and as far as HUD code I think I might remember JB saying that can be tricky. You're on the right track by decompiling of course but you might need to decompile a lot more packages to figure out what you want to do.
coopdvi1
Posts: 26
Joined: Sun Jan 22, 2006 9:34 am

Progress

Post by coopdvi1 »

So I made the mutator. Good idea: it works great. I don't really know how to script (at all), and so I learned a lot in making this mutator (it being my first an' all). Now I want to make mutators for everything--including for this long-standing problem; maybe you can help me. I play vehicle deathmatch (with the VTDM custom gametype), which plays deathmatch on Onslaught maps. It being deathmatch, the Onslaught radar is somehow disabled. How would one create a mutator that adds that Onslaught radar back to the HUD (so players who don't know the map can figure out where they're going)?

Like you said, the HUD thing's gonna take some doing...

SJC
Dorian_Old
Posts: 53
Joined: Wed Oct 31, 2007 2:14 am

Post by Dorian_Old »

My best guess is that you would need to do more than make a mutator. Maybe extend the VTDM gametype and borrow some lines from the ONS HUD code, after figuring out how to enable a radar in a DM gametype. I think Invasion extends TDM or xTeamGame or TeamGame, can't remember for sure. Invasion uses a radar of course and sure its radar is primitive compared to ONS's but at least you'd find out how to enable the radar.

Or, you could just settle with this mutator, it's neat:
http://www.bathotaxe.com/games/index.html

Yeah I have dabbled in 2k4 coding a bit ... my only claim to fame was making a link gun mod that would blow monsters up, like a balloon, not to pieces. I had to use the primary fire mode because I couldn't figure out how to make it work with the secondary beam fire; the code for the beam fire is far more sophisticated than the primary projectile fire. Plus it would lag the heck out of clients and most likely servers too because I never did figure out how to scale down the gigantic gibs that would result from killing the Godzilla/King Kong-sized monsters.
coopdvi1
Posts: 26
Joined: Sun Jan 22, 2006 9:34 am

Post by coopdvi1 »

I have Radar2004; it doesn't accomplish the goal because it shows the enemies (and so I would like more of a minimap than a radar), and doesn't have the terrain. I guess I'll work on that VTDM gametype...

I appreciate your time, Dorian. I just have one more tiny, little question. As stated earlier I've been trying to reduce the volume on the Chaos grapple. I've decompiled "ChaosEsounds1.uax", the package that contains the grapple sounds, used the Goldwave application to reduce all 12 of the grapple sounds to 10% of their volume, recompiled the file, replaced the old one with the new one, and ran the game. The volume of the grapple was unchanged. So I did it again. Still unchanged. What am I missing?

SJC

BTW I use Wiki as a resource regularly. It is very good.
Dorian_Old
Posts: 53
Joined: Wed Oct 31, 2007 2:14 am

Post by Dorian_Old »

Sorry, when I said make a mutator I should've included the grapple sound. It wasn't necessary for you to modify the actual wave files ... in the source of ChaosGames you'll find some files related to the grapple. There are defaultproperties pertaining to sound that you need to change. For any game, sounds are imported at a flat volume and then code is used to determine the volume. I think 2k4's volume range for sounds is 0-255.

I kind of had the feeling Radar2004 wouldn't do what you need but I thought I would just throw it out there.

Even though I have only dabbled in uscript, I picked up a lot of its principles and I've been glad to help. Feel free to keep this thread alive or PM me ... I have email notification on globally since this board is a bit of a ghost town nowadays.
coopdvi1
Posts: 26
Joined: Sun Jan 22, 2006 9:34 am

Post by coopdvi1 »

Thanks. I won't bother you too much.

With the grapple sound, I tried the mutator route first. I decompiled, found all the sound volume/sound radius stuff I could find, and changed it in the mutator I made.

Class'ChaosUT.HoverGrappleHook'.Default.SoundVolume = 75;
Class'ChaosUT.HoverGrappleHook'.Default.SoundRadius = 50.000000;
Class'ChaosGames.Grapple_hook'.Default.SoundVolume = 75;
Class'ChaosGames.Grapple_hook'.Default.SoundRadius = 50.000000;
Class'ChaosGames.Grapple_inv'.Default.SoundVolume = 128;
Class'ChaosGames.Grapple_inv'.Default.SoundRadius = 122.000000;

The change mutator partially worked: it changed the "Grapple_hookfly" sound. Problem is, the "Grapple_hookwallclose", "Grapple_hookfire", and "Grapple_hookopen" sounds didn't change, and I couldn't find the settings for them. That's why I went to the wave files. Any suggestions?

SJC
Dorian_Old
Posts: 53
Joined: Wed Oct 31, 2007 2:14 am

Post by Dorian_Old »

i am pretty well stumped on that one, sorry
coopdvi1
Posts: 26
Joined: Sun Jan 22, 2006 9:34 am

No Worries

Post by coopdvi1 »

Thanks for the effort, Dorian. I've actually made some progress on other fronts (thanks to your help). As I said earlier, I made a mutator that makes the changes to the ERDW ammo and the ERDW ammo pickup. I also made a new vehicle deathmatch gametype with a new HUD--that has a minimap: I copy-pasted the ONSHUDOnslaught code manipulated it so it looked like a Team Deathmatch HUD, and so the minimap is fit for deathmatch (e.g., smaller, with no node links or "attacking node" notifications). Not bad for someone who's never coded in C++/Unreal Script before, huh? I've come so far in the last week.

And I couldn't have gotten this far without your help. Thank you.

SJC
coopdvi1
Posts: 26
Joined: Sun Jan 22, 2006 9:34 am

Eureeka!

Post by coopdvi1 »

So here's the solution.

There are default properties in the Chaos code that control some of the grapple sound volumes; the volumes for the other are in the code. The sounds are executed in two files (in ChaosGames.u, two code files Grapple_hook.uc and Grapple_inv.uc) with a function "PlaySound()". First I'd heard of it 'til now, but that's not saying much.

The first variable in the PlaysSound() function is the name/location of the sound file. The second variable in the funciton is the port in which the sound is to be played (????). The third variable is the volume at which the sound is to be played. It is a multiplier--e.g., if it is set to 2 the sound will play twice as loud as it is recorded. The values in the code are hard-coded (which is why there are no default properties to control them), and are set to rediculously high numbers, like 255, 200 and 100. I decreased these multipliers to 0.5 in every place I found the function (in both documents), and reduced the SoundVolume and SoundRadius default properties by half (in both documents). I recompiled ChaosGames.u (which was non-trivial), and the sound was reduced in half. Yippee!!! So that's off my plate.

I have another question, maybe a little simpler. I want to change the skins on the vehicles in the game via the mutator I made. I was successful in doing so on the server machine, but anyone who joins my game sees the default skins. I add the server package to both my UT2004.ini and my ChaosUT2.ini files, and they have the textures on their machines. What else do I need to do?

SJC
Post Reply