[MODDING] Setting "Protection" & "Armor"

The place to discuss all things Lugaru.
Post Reply
User avatar
ChosenOne
Posts: 46
Joined: Sat Jul 17, 2010 4:00 pm

[MODDING] Setting "Protection" & "Armor"

Post by ChosenOne » Fri Aug 06, 2010 5:15 pm

The console commands "Protection" and "Armor" don't work!!!

Protection - resistance of blunt attacks (punches, kicks, etc)

Armor - resistance of sharp attacks (knives, swords)




When I set my character's "Protection" and/or "Armor", no matter what values I try, all the way up to 10000000000.0 even, they get reduced to nothing. One attack still kills me.

In other words, even though I try setting either "Protection" and "Armor", to the likes of 10000000000.0, one little punch will cause me to explode into a bloody mist or keel over dead from a single knife slash.

I've even tried negative values.

Same goes for altering enemies' "Protection" and "Armor".

What gives? I've played mods others have done where they've obviously successfully altered attack resistances. A prime example is Tannim's evil twin boss.

How are you guys setting up how tough enemies are???

User avatar
rudel_ic
official Wolfire heckler
Posts: 2193
Joined: Sun Aug 28, 2005 11:19 pm
Location: Hamburg City
Contact:

Re: [MODDING] Setting "Protection" & "Armor"

Post by rudel_ic » Fri Aug 06, 2010 9:03 pm

They need 3 values, for example

Code: Select all

protection 2.0 1.5 1.3
That's high, medium and low protection (works just the same for armor).

Note that the outcome takes your current protection (or armor) and multiplies it with that value.
So if you do these two in succession, that while starting with protection 1.0 1.0 1.0:

Code: Select all

protection 1.5 1.5 1.5
protection 2.0 2.0 2.0
the result is protection 1.0*1.5*2.0 1.0*1.5*2.0 1.0*1.5*2.0 = protection 3.0 3.0 3.0

HTH

User avatar
ChosenOne
Posts: 46
Joined: Sat Jul 17, 2010 4:00 pm

Re: [MODDING] Setting "Protection" & "Armor"

Post by ChosenOne » Fri Aug 06, 2010 11:54 pm

RIGHTEOUS!!!

After some testing I see High, Medium and Low refers to body parts - head, chest and legs. Setting an enemies protection to 1.0 1.0 0.001 makes his legs take massive damage when struck. Though it's not in terms of collision detection. Just sweeps actually (even tried setting my size to 0.3 so I could punch his legs easily - not only does the little impact dust cloud still come from his chest but his chest got the damage as well). Likewise with making "High" a very low value - the roundhouse kick will inflict massive damage.

I'm now able to set my protection so low falling wrong kills me, hehe.


We've modded the code to save the player char's proportions and size settings (had to up the map file version, which imposes legacy version problems but that's unavoidable). I see that protection, armor, speed and size already save with the map. That's good. You can save speed, too. If only you could set an enemies speed and strength, and save it in the map as well.

How did Tannim set the evil twin boss to knock you across the map, let alone rig it to where you survive the hits?

User avatar
tannim
Posts: 271
Joined: Tue Sep 30, 2008 5:54 pm
Contact:

Re: [MODDING] Setting "Protection" & "Armor"

Post by tannim » Sat Aug 07, 2010 12:10 am

That took some practice using the protection and armor commands.

You have to be careful with protection because what is set on YOU is set on any enemy you place after you change your stats(including proportion). Essentially, you are making clones of yourself when you set an enemy.

I originally tried using it for something I called Rabbit Assist Jumping. Sadly, it is too complex and unpredictable for that. Essentially, it was rocket jumping. You set a super strong enemy, then super protectioned yourself. The rabbit was then suppose to kick or punch you across the map into a goal(a tunnel with a wall at the end). The next rabbit was then supposed to punch you into a different wall until you got to the goal. There are far too many problems with getting this premise to work(though it DID work sometimes). Sometimes they would POP you into a blood puddle, sometimes they would shoot you through a wall, othertimes they wouldn't hit you hard enough.
(Setting the boxes to catch you was also a problem).

To set the enemy super strong, "strength ***" with ** being a number. Start low, work up. Too high crashes game and... you.

Protection 100 100 100 is good
armor 100 100 100 is good
When done setting enemies, you should set yourself to whatever you want YOU at, then save the map and reload and test strength. You may have to work a lot to get the strength and protection and armor you want.

I do not think there is a Health option, but feel free to type health *** just in case. IT probably won't work, but who knows. The health bar would be handy for testing this stuff by the way.

User avatar
ChosenOne
Posts: 46
Joined: Sat Jul 17, 2010 4:00 pm

Re: [MODDING] Setting "Protection" & "Armor"

Post by ChosenOne » Sat Aug 07, 2010 12:14 am

Additionally

I was unable to determine what type of damage the following attacks do:

getting thrown
being knocked into something/falling onto something
two-legged rabbit kick
fire
proximity damage from exploding rabbit

User avatar
tannim
Posts: 271
Joined: Tue Sep 30, 2008 5:54 pm
Contact:

Re: [MODDING] Setting "Protection" & "Armor"

Post by tannim » Sat Aug 07, 2010 12:17 am

You should use the health bar mod somebody made.

Set protection and armor for each type of damage to 0. Then set protection and armor for all but one and see how it goes. If you don't take a lot of damage, set the 0 back to high, then set another back to 0.

User avatar
rudel_ic
official Wolfire heckler
Posts: 2193
Joined: Sun Aug 28, 2005 11:19 pm
Location: Hamburg City
Contact:

Re: [MODDING] Setting "Protection" & "Armor"

Post by rudel_ic » Sat Aug 07, 2010 12:28 am

ChosenOne wrote: We've modded the code to save the player char's proportions and size settings (had to up the map file version, which imposes legacy version problems but that's unavoidable).
Actually, it is avoidable. If you always put custom map data to the end of the format, the old mapcode still eats the new format. You just have to re-reference or keep the order consistent (depending on what you're actually adding) so that you don't have issues loading.
This is a common trick, and it's really nice for quick addons in a closed environment while still complying with legacy code.

Another way of doing it is adding a new file format, of course. The new file format has a new folder (for example Lugaru/Data/CustomFormatData/ChosenOne/Maps/). Your code loads custom addon data in that folder automatically if it exists. That is also a great way of solving this because it introduces a new metaphor, and you can collaborate extremely flexibly with other modders while not breaking other peoples' loading code.

User avatar
ChosenOne
Posts: 46
Joined: Sat Jul 17, 2010 4:00 pm

Re: [MODDING] Setting "Protection" & "Armor"

Post by ChosenOne » Sat Aug 07, 2010 7:14 am

Oh ho!!!

I didn't even try that. Even though there's no "StrengthNear" command you can set your own strength and clone yourself and all you settings transfer to the "clone". Even speed. Oh this opens up some wacky possibilities! Thanks, Tannim! I got the evil twin settings working well.

I made a medium sized enclosure, set my speed and strength way up and cloned myself at least 20 times. Exited map mode and the hysteria began. I ran to an inside corner to lure the enemies to me. At Speed 2.0 they ran so fast that 12 rabbits died instantly by converging on the same point at the same time, running into eachother. 12 rabbit pile-up. I didn't even touch 'em. The physics calculations brought the FPS to nearly nothing, though. So, gotta watch that.


rudel_ic wrote:Actually, it is avoidable. If you always put custom map data to the end of the format, the old mapcode still eats the new format. You just have to re-reference or keep the order consistent (depending on what you're actually adding) so that you don't have issues loading.
This is a common trick, and it's really nice for quick addons in a closed environment while still complying with legacy code.
Hmm, that's good to hear! I'll pass that along.

User avatar
tannim
Posts: 271
Joined: Tue Sep 30, 2008 5:54 pm
Contact:

Re: [MODDING] Setting "Protection" & "Armor"

Post by tannim » Sat Aug 07, 2010 3:01 pm

Careful with the speed setting, anything above 1.4 seems unplayable :} Even 1.3 is pushing it.

Glad you got the power battle settings(my original title for that level) working. Such battles will frustrate a lot of users though, many never made it past mine(though all they had to do was sneak around after getting punched through the floor and spine crack him)

User avatar
ChosenOne
Posts: 46
Joined: Sat Jul 17, 2010 4:00 pm

Re: [MODDING] Setting "Protection" & "Armor"

Post by ChosenOne » Sat Aug 07, 2010 3:35 pm

Yeah, I used Speed 2.0 and the engine kinda broke down - the enemies couldn't even control themselves anymore, they could never score a hit on me, they only ran past me constantly hehe.

For added fun, in my little enclosure, I placed big fireballs in each corner and so with the high number of rabbits running around at top speeds, they quickly lit themselves all on fire beating the map for me. Heaps of burning rabbits everywhere -the smell of victory and burnt rabbit hair were one.

The trouble with your Evil Twin map was the distance you'd you have to run to get back to him all the time. Your levels made me eager just to get to the next map so I could see what you'd done with it.

User avatar
tannim
Posts: 271
Joined: Tue Sep 30, 2008 5:54 pm
Contact:

Re: [MODDING] Setting "Protection" & "Armor"

Post by tannim » Sat Aug 07, 2010 4:55 pm

I tried a very high speed once, I warped into the level as normal and instantly won

The fireballs would be amusing to watch them all run through, but without auto-respawn it is short lived :/

With Evil Twin I found, sadly, that too much strength breaks the game's collision detection.(very much like the DBZ cartoon that way). He can easily punch you through two walls and the only way to get back in is to climb up a hill.

I thought to put a third and even a fourth wall, but they just didn't seem to stop the problem. I think there may have been a size issue with how HUGE I made the objects though. Perhaps a little smaller and you will not fly through them so readily(not true but maybe slightly less as he punched me through smaller walls easily I think)

I'm glad the maps inspired you. Overall, they were fun to do, if frustrating. I had planned another, a tunnel maze, but I gave up due to difficulty placing tunnels and chimneys.

Another concept I tested I called Rabbit Rain. You are trapped in a big chimney, a narrow one, and 8 rabbits were set to walk down 4 runways and then over the edge. They were timed so they'd fall close together and you would have to dodge their corpses as they plummeted to the ground around you. It didn't work. The rabbits did plummet correctly, but once they go ragdoll they cannot collide with you. You could freely jump up through the falling rabbits with no harm done. Interestingly a few rabbits even survived the very great fall.

User avatar
ChosenOne
Posts: 46
Joined: Sat Jul 17, 2010 4:00 pm

Re: [MODDING] Setting "Protection" & "Armor"

Post by ChosenOne » Sat Aug 07, 2010 10:09 pm

Hehe, I had a very similar idea as your rabbit rain, but after they began to fall they were to fall through fire so they'd be a definite threat, whether or not they collided with you or not.


Know how to use the Mobile and Immobile commands? They have no result for me. Are they for use only with dialogue?

User avatar
tannim
Posts: 271
Joined: Tue Sep 30, 2008 5:54 pm
Contact:

Re: [MODDING] Setting "Protection" & "Armor"

Post by tannim » Sat Aug 07, 2010 11:27 pm

As far as I know the im/mobile commands do nothing.


I tried to avoid using fire, in that situation it wouldn't have been fun because you'd keep stepping in it. May as well make a firemaze instead as you'd be dodging flames either way.

Could be cool to make a maze of flaming dead rabbits, but since that would take a lot of rabbits, wouldn't really work.

Post Reply