Content: Slate Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate Marble
Background: Slate Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate Marble
Pattern: Blank Waves Notes Sharp Wood Rockface Leather Honey Vertical Triangles
Welcome to Xbox Chaos: Modding Evolved

Register now to gain access to all of our features. Once registered and logged in, you will be able to contribute to this site by submitting your own content or replying to existing content. You'll be able to customize your profile, receive reputation points as a reward for submitting content, while also communicating with other members via your own private inbox, plus much more! This message will be removed once you have signed in.

Sign in to follow this  
Followers 0
Ingulit

Modding
Some Misc Gametype/Scripting Questions

43 posts in this topic

I feel bad clogging up the board with a bunch of threads, so I'm going use this to post some of the questions I've wanted to ask that aren't each worth their own thread. I'll use this thread if I come up with any other questions down the road. HOPEFULLY these are relatively simple questions.

 

  • Can one make all armor abilities EXCEPT one (in this case jetpack) infinite use? That is, Jetpack should run out, but Thruster Pack should be infinite.
  • Can Thruster Pack be changed to where you stay in first person (like Evade)?
  • Can one have more than 5 loadout slots in a gametype?

 

For these questions, if someone has already done these things before, I would really, really appreciate being directed to those examples so I can see what the scripting looks like to do this stuff.

Edited by Ingulit

Share this post


Link to post
Share on other sites

The armor ability one is easy, jut check the players armor ability and if it matches any of the wanted ones then just apply traits that include unlimited ability use.

We have no control of the camera through gametypes, so don't expect any camera mods.

You can have up to 10 game loadouts, but anything above 7 is going to reveal some glitches. Its a more advanced thing to do any of this so if you really want to incorporate these things then youll need some help most likely.

Share this post


Link to post
Share on other sites

1. Can one make all armor abilities EXCEPT one (in this case jetpack) infinite use? That is, Jetpack should run out, but Thruster Pack should be infinite.

 

Yes, this is 100% possible. All you need to do, is run through each player, check if they have any of the abilities (except Jetpack) equipped, and apply traits with "EquipmentEnergyUseRateModifier" set to 0. You can decode my Hybrid Slayer gametype and see how this can be done if you wish.

 

Also, If you want to disable the recharge on Jetpack, then you need to check if the player has this ability, and apply traits with "EquipmentEnergyUseRechargeRateModifier" set to 0.  Be aware that even if this trait is applied on players (with any ability), when they drop the ability, it will still recharge its energy when sitting on the ground, as the traits are being applied to the players, not the abilities themselves.

 

2. Can Thruster Pack be changed to where you stay in first person (like Evade)?

 

Pretty sure this can't be done, as it would most likely require messing around in the games engine.

 

3. Can one have more than 5 loadout slots in a gametype?

 

Again, this is absolutely possible. AbandonedCashew has used Map Loadouts to add two more slots in his Finite gametype, though I'm not sure if you can have any more visible. You won't be able to edit the extra loadouts from in-game settings, so just keep that in mind if you wish to use them.

 

 

 

Ninja'd by Clay... -_-'

Edited by Pfeuff
AbandonedCashew likes this

Share this post


Link to post
Share on other sites

Thank you all for your help!! Thanks to y'all I now have the Jetpack thing working :biggrin:

 

I've got a few more questions:

  • How does one change the category that a gametype is in? For example, I downloaded an Infection gametype that is in its own category, but I can't decompile it to figure out what was changed. I tried changing the values that seemed logical to change in KSoft but the gametype stopped appearing on my console (doh).
  • Is there any way to add a sprint toggle to the in-game trait options without modifying any .map files?
  • How does one install .map files anyway? :V
  • When one creates custom traits, the first four appear in the in-game menu; is there any way to make more than that appear (specifically five, which would end up being one for each loadout)? Could respawn traits be removed to make room or something like that?
  • How does one change what the announcer says at the beginning of a round and/or when an incident occurs (for example, when the player enters a hill in KotH)? Is there a list of the different things he can say?
  • Is it possible to remove the blurring effect at the beginning of a round during loadout selection? EDIT: Found the answer
  • How does one increase the health of things like Fusion Coils? I found one thread that discussed it, but a conclusion was never reached.

Sorry, that ended up being a lot of questions, haha! All the help is very, very appreciated :biggrin:

Edited by Ingulit

Share this post


Link to post
Share on other sites

1: The maps category is under Base as "engineCategoryIndex," and in the same line as "Megalo encoding." 25 is Community, Ricochet is 6. Everything in-between isn't taken

2. No, we only can change the user options, not engine or trait options.

4. Only 4 can every be visible

5. a. Look under the incident condition "player_activated" or "player_spawn," it's different for each gametype but all initial incidents are similar.

5. b. The announcer can say things through incidents or CHudSoundMessages. Hit and miss as to what incidents have sound if you don't just know, same with which CHud sounds even are valid, but look for where KotH does stuff for a player being in the hill (not easy for a starter) and then just swap out any respective incidents.

6. If the health you want it to be set to is higher than normal, use ObjectSetMaximumBodyVitality, and then ObjectModifyHealth. Make sure these only run through for one tick. If the health is lower than normal, then just use ObjectModifyHealth.

Share this post


Link to post
Share on other sites
  • How does one change the category that a gametype is in? For example, I downloaded an Infection gametype that is in its own category, but I can't decompile it to figure out what was changed. I tried changing the values that seemed logical to change in KSoft but the gametype stopped appearing on my console (doh).

Two spots:

0jawwVH.png

 

g5sfDSK.png

 

I can't find a list of the indices though, but you'll want want to match the category string to that of the index as well.

 

i0dEV8Z.png

 

  • How does one install .map files anyway? :V

 

You need a modded console or a Development Kit. If you have one of those, .map files go in the "maps" directory, .blf files go in the "maps\images" directory, and .mapinfo files go in "maps\info".

 

  • How does one change what the announcer says at the beginning of a round and/or when an incident occurs (for example, when the player enters a hill in KotH)? Is there a list of the different things he can say?

Through an incident:

cESiC6c.png

 

You can find incidents in the file "Halo4_Xbox_megalo.xml" which will be in your ksoft directory in "ksoft\Games\Halo4\Definitions". Look for this element: "<ingd name="globals\game_incident">.

 

You can also play other sounds without an incident:

3T0c25Y.png

 

Sounds can be found in the same file in the element "<mgls name="multiplayer\megalo\english">"

 

 

As for your other questions, I can not be of any help. Hopefully someone else will be able to answer them.

Share this post


Link to post
Share on other sites

Gonna add one thing here:

 

Is there any way to add a sprint toggle to the in-game trait options without modifying any .map files?

While there is no way to add a toggle to the traits menu, what you can do is add a toggle to the game options menu. You'd have to create a custom option for the toggle, and then if it's set, each tick you'd loop through each player and apply a trait set which has sprint disabled.

Share this post


Link to post
Share on other sites

All of the help has been phenomenal, thank you all so much! I have the custom gametype category working now, and I'm working on the sounds and object health now :D

 

I have another quick question that's been making me tear my hair out regarding custom user defined options:

  • In UserDefinedOptions, what does valueIndex do? Sometimes I see it equal to "0", other times to "7"; what are those numbers referencing?

Share this post


Link to post
Share on other sites

 

All of the help has been phenomenal, thank you all so much! I have the custom gametype category working now, and I'm working on the sounds and object health now :biggrin:

 

I have another quick question that's been making me tear my hair out regarding custom user defined options:

  • In UserDefinedOptions, what does valueIndex do? Sometimes I see it equal to "0", other times to "7"; what are those numbers referencing?

 

If I'm not mistaken, it's the selected index of the entries, with 0 being the first entry.

7ime likes this

Share this post


Link to post
Share on other sites

Cool, so setting them to "0" doesn't do anything negative after all; I thought I had read someone saying it changes something about the possible values the option can take on, and I'm glad it's not quite that complicated, haha! With this in mind I got the sprint toggle working as a gametype option!! I'm cooking with gas now :biggrin:

 

I've got another question that I want to say I found the answer to at one point but I've misplaced where I found it:

  • There is a glitch in Flood that I want to fix in a custom gametype. In a Flood gametype that has only one Flood and every player only has one life, if the Flood dies prior to infecting a Spartan, the game does not end despite the Flood not being able to respawn (the only way to finish the round is if one of the Spartans either commits suicide or betrays a teammate). How would I go about fixing this, or has someone done so already that I could be linked to? I thought I saw someone came up with a fix but I misplaced that link apparently.
Edited by Ingulit

Share this post


Link to post
Share on other sites

I'm getting the feeling the answer to that question is "it's not that hard to figure it out on your own," haha! That's totally fine, I think I can handle that :)

 

I have a couple sound questions:

  • In Ricochet, the ball will start beeping before it explodes. In my gametype I have a player with a ball that will explode after they've held the ball for 20 seconds (via a timer), but that timer resets when they get a ball kill. Can I implement the beeping for that, or is it exclusive to Ricochet?
  • Can I have the beeping only be heard by the player holding the ball?
  • Is there an easy way to listen to what all the available sounds are rather than testing each one individually in a gametype?
  • Finally, I was thinking of making a sound play when an explosive gadget (Fusion Coil, etc.) explodes, but I want the sound play where the explosive was (as in, if you're close to the explosive you'll hear it, but if you're farther away you won't). While my gut tells me "no," is that at all possible?
Edited by Ingulit

Share this post


Link to post
Share on other sites

Play a CHudSoundMessage with a target of the player you want, and the sound is skullball tick or something like that for the beeping, make sure to only run it through once and it lasts 3 seconds. Look in English section of the Megalo definitions and youll see all the indexes and that one. Only some work. I'm pretty darn sure we don't have anything to listen to all of them easily though. A lot don't work, even the ones in dominion and extraction don't work if you try them. If you find one that you like for exploding things, then run on Object Death Event, check if its the object you want, and execute PlaySoundOnObjectMessage (might not be exactly that name). That plays the sound only for nearby players.

Edited by AbandonedCashew

Share this post


Link to post
Share on other sites

Thank you!! I was able to get most of that to work (I haven't done the beeping ball just yet because I need to learn more about timers to get it to work properly), and the ObjectDeathEvent stuff really helped me with my gametype :D Unfortunately the "spawn a sound on an exploding item" thing probably won't be that useful after all, since while it DID work, the explosion deafens anyone close enough to hear it xD

 

Hokay, new question!

  • How do I spawn an explosion on a player that will kill both the player and anyone nearby?

I came across the "Rush Slayer" gametype and that had exactly what I wanted to do (if you specify the explosion to be "Lethal" when your Cranked timer runs out you explode and kill people near you), but it's not decodable:
@Gabotron ES

http://www.xboxchaos.com/topic/3714-rush-slayer/

 

What are the basics of doing this (spawning explosions)?

Share this post


Link to post
Share on other sites

Sorry to double post but I just don't understand what is happening:

 

I'm trying to mod an Infinity Slayer gametype so that if a player has a specific armor ability, they have a specific trait set (think Role Slayer). However, even if I turn off all my triggers (meaning the gametype is almost exactly Infinity Slayer), the game always freezes the moment any player gets a kill.

 

Please tell me this is a common problem that's easily fixed, because I'm out of ideas as far as what I could be doing wrong.

Edited by Ingulit

Share this post


Link to post
Share on other sites

Well there are only a couple ways of making an xbox freeze. One of us would have to check for the possible problems. Look under any script you wrote under the condition- kill incident.

To do make an explosion "kill" a player, check if they are close to the explosion, then just do objectkillinstantly on their slave object.

Share this post


Link to post
Share on other sites

Baha, I got the freezing fixed; the appearance section of my leader traits were wonky and fixing that solved the problem.

 

I've got another question:

  • How do I manipulate floating-point numbers in a gametype?

I'm trying to check to see if a player's sheilds are less than 0.0 (gone), less than 0.1, less than 0.2, etc., but I can't figure out how to get the game to accept decimal points since everything seems to be an int (which is odd since you can assign floating point values to traits...?). I tried dividing a scratch by 10 like the built-in gametypes do in a few places, but as far as I can tell it's doing integer division because it looks like dividing 1 by 10 is resulting in 0.

 

I looked in the MegaloScriptDatabase and I'm not seeing anything that looks like floating point, unless it's "Point3d" or "Single."

 

Did I miss something totally obvious, lol?

Edited by Ingulit

Share this post


Link to post
Share on other sites

I've never been able to get decimals. I mean just check if a players shields are 0 and itll work. Also if you wanna check if theyre dead just check if their health is 0. Not sure why you need a tenth of a percent accuracy. I would think 1% is the best accuracy you need, considering the actual game doesn't get any more accurate.

Edited by AbandonedCashew
Ingulit likes this

Share this post


Link to post
Share on other sites

I've never been able to get decimals. I mean just check if a players shields are 0 and itll work. Also if you wanna check if theyre dead just check if their health is 0. Not sure why you need a tenth of a percent accuracy. I would think 1% is the best accuracy you need, considering the actual game doesn't get any more accurate.

Oh my goodness I don't know where my mind was, I totally forgot the health is normally in the range of [0,100] and not [0,1] :V When I was saying 0.1, I meant 10%, so I can totally just use "10" V: Derp, haha!

 

Thank you for the info; it's sad that decimals aren't easily doable, though I'm glad to hear I can still achieve what I wanted to do. :biggrin:

 

 

EDIT: Is there a list of all the valid Loadout nameIndexes? Stuff like how 76 is "Hunter."

Edited by Ingulit

Share this post


Link to post
Share on other sites

Awesome, I found it and it had exactly what I was looking for :biggrin: After cleaning it up a tad, I think I'll be able to release my first gametype!

 

These questions are mostly for curiosity's sake as I don't currently have projects for these right now, but I'm thinking this'll be helpful to know down the road:

  • Is there an action that directly deals damage to a player's shields and/or health? I've been able to essentially do this by reading in the health, subtracting a value from it, and then modifying it back out, but I want to check if there is an action to do this in a less-complicated way.
  • Is there any way to detect when something deals damage to a player and retrieve the amount of damage it dealt? I cobbled together a roundabout solution to do this using player numerics that store/check the player's health each tick, but I wanted to know if there was an easier method (preferably one that doesn't use up a player numeric).
  • If a gametype is already using all 10 player numerics but you want more, what is the best alternative? Can you use other kinds of variables (teams, objects, etc) for that player instead?

For the third question, I had the idea to use an object numeric and check/modify the player's SlaveObject, but that proved sorta convoluted when I tried it. I feel like teams would probably work the best since they're essentially numerics as far as I can tell, but I want to make sure that players having extra team variables won't confuse the gametype or anything (I've tried it myself and I don't THINK anything was wrong, but I don't know what to look for).

Edited by Ingulit

Share this post


Link to post
Share on other sites

Awesome, I found it and it had exactly what I was looking for :biggrin: After cleaning it up a tad, I think I'll be able to release my first gametype!

 

These questions are mostly for curiosity's sake as I don't currently have projects for these right now, but I'm thinking this'll be helpful to know down the road:

  • Is there an action that directly deals damage to a player's shields and/or health? I've been able to essentially do this by reading in the health, subtracting a value from it, and then modifying it back out, but I want to check if there is an action to do this in a less-complicated way.
  • Is there any way to detect when something deals damage to a player and retrieve the amount of damage it dealt? I cobbled together a roundabout solution to do this using player numerics that store/check the player's health each tick, but I wanted to know if there was an easier method (preferably one that doesn't use up a player numeric).
  • If a gametype is already using all 10 player numerics but you want more, what is the best alternative? Can you use other kinds of variables (teams, objects, etc) for that player instead?

For the third question, I had the idea to use an object numeric and check/modify the player's SlaveObject, but that proved sorta convoluted when I tried it. I feel like teams would probably work the best since they're essentially numerics as far as I can tell, but I want to make sure that players having extra team variables won't confuse the gametype or anything (I've tried it myself and I don't THINK anything was wrong, but I don't know what to look for).

 

I'm not much help but you could decode my evolved slayer to see what i did for labels & etc or decode vintage gecko's gametype for references on running out of numeric's. I ran out as well. lol. But its been awhile sense i modified as I let halo 4 after building the two race maps on halo 4 & gave my copy to my cousin. 

Share this post


Link to post
Share on other sites

Awesome, I found it and it had exactly what I was looking for :biggrin: After cleaning it up a tad, I think I'll be able to release my first gametype!

 

These questions are mostly for curiosity's sake as I don't currently have projects for these right now, but I'm thinking this'll be helpful to know down the road:

  • Is there an action that directly deals damage to a player's shields and/or health? I've been able to essentially do this by reading in the health, subtracting a value from it, and then modifying it back out, but I want to check if there is an action to do this in a less-complicated way.
  • Is there any way to detect when something deals damage to a player and retrieve the amount of damage it dealt? I cobbled together a roundabout solution to do this using player numerics that store/check the player's health each tick, but I wanted to know if there was an easier method (preferably one that doesn't use up a player numeric).
  • If a gametype is already using all 10 player numerics but you want more, what is the best alternative? Can you use other kinds of variables (teams, objects, etc) for that player instead?

For the third question, I had the idea to use an object numeric and check/modify the player's SlaveObject, but that proved sorta convoluted when I tried it. I feel like teams would probably work the best since they're essentially numerics as far as I can tell, but I want to make sure that players having extra team variables won't confuse the gametype or anything (I've tried it myself and I don't THINK anything was wrong, but I don't know what to look for).

1: ObjectModifyHealth/ObjectModifyShields, just subtract some value.

2: Can only get the health and do a little math, no more afaik.

3: Just remove some from Flood, it uses a few only like 3 times.

Edited by AbandonedCashew

Share this post


Link to post
Share on other sites

Hokay, now I've got a weird problem: when I apply player traits that change the jump or grav multiplier, the player's corresponding multiplier is MULTIPLIED by the new value, not REPLACED by it like I expected.

 

That is to say, if the base (or current) jump multiplier is 2.00##### (the #s are the random decimal points the multipliers all seem to acquire during decoding) and the new jump multiplier is 1.50######, rather than the multiplier becoming 1.50###### like I expected, the multiplier becomes 3.00######! Then if I apply the 1.50##### traits again, it becomes 4.50###### as far as I can tell O.o

 

Is this expected behavior of ApplyPlayerTraits? Is there any way to force the game to override the old multiplier value rather than multiply it?

 

Here is my gametype that is causing the problem (jump to line 3974): http://pastebin.com/wqzXqSg2

The gametype was based on Slayer because it was a quick test gametype that I designed to, in theory, see the effects of various combinations of gravity and jump multipliers without recompiling the gametype each time, but the multiplying effect made this not particularly useful. The non-slayer scripts begin on line 3974 (I commented the custom scripts rather heavily).

Edited by Ingulit

Share this post


Link to post
Share on other sites

Hokay, now I've got a weird problem: when I apply player traits that change the jump or grav multiplier, the player's corresponding multiplier is MULTIPLIED by the new value, not REPLACED by it like I expected.

 

That is to say, if the base (or current) jump multiplier is 2.00##### (the #s are the random decimal points the multipliers all seem to acquire during decoding) and the new jump multiplier is 1.50######, rather than the multiplier becoming 1.50###### like I expected, the multiplier becomes 3.00######! Then if I apply the 1.50##### traits again, it becomes 4.50###### as far as I can tell O.o

 

Is this expected behavior of ApplyPlayerTraits? Is there any way to force the game to override the old multiplier value rather than multiply it?

 

Here is my gametype that is causing the problem (jump to line 3974): http://pastebin.com/wqzXqSg2

The gametype was based on Slayer because it was a quick test gametype that I designed to, in theory, see the effects of various combinations of gravity and jump multipliers without recompiling the gametype each time, but the multiplying effect made this not particularly useful. The non-slayer scripts begin on line 3974 (I commented the custom scripts rather heavily).

 

I do know if you mess with gravity triaits don't have them look in the base traits menu or it will change. Hence why I did not add a gravity changer in userdefined options, as it didn't work. Not certain why even though I had it set exactly like it was s'posed to do. 

Share this post


Link to post
Share on other sites

I figured it out, I forgot some tags in the traits and KSoft was ignoring them (not multiplying like I'd thought, just not working at all lol).

 

My next question is rather different:

  • I've been doing some modding for a gametype that my friends and I play, and in it we use non-standard movement traits (stuff like 2.22 movement speed and similarly nonstandard jump height, gravity, etc.) because we're trying to emulate Reach's physics. My friend does a lot of forging and wants to be able to use these traits in forge; is there any way to do that? The only decoded Basic Editing I've found doesn't compile with KSoft, and even if it did I don't know if that would enable use to use those traits or not.
Edited by Ingulit

Share this post


Link to post
Share on other sites
Sign in to follow this  
Followers 0