how can I change the armor max amount of the player?

Need help with your project? Ask here.
User avatar
MauricioRocks
Posts: 30
Joined: Sun Feb 10, 2008 18:16
Location: São Paulo

how can I change the armor max amount of the player?

Post by MauricioRocks »

hey guys, I need some help!

I need to make two new kinds of armor, based on the Doom 3's armor shards and armor vests... the armor shards must give 5 units and the armor vests must give 50 units, and the total must be 125;

I'm trying to edit the max amount of armor that the player can carry... at this moment, it works pretty well when you pickup the new armor inventory itens, but if you type idfa or idkfa, the player receive 200 units of armor, and I need to make something to change this value to 125.. what can I do to change this?



obs: if someone wants to see the code, here it is:

[spoiler]ACTOR ArmorShard : BasicArmorBonus Replaces ArmorBonus
{
Radius 20
Height 16
Inventory.Pickupmessage "Armor Shard"
Inventory.PickupSound "misc/shard_pkup"
Armor.Saveamount 5
Armor.MaxSaveAmount 125
+COUNTITEM
-INVENTORY.ALWAYSPICKUP
States
{
Spawn:
ARMS A -1
Stop
}
}


ACTOR ArmorVest : BasicArmorBonus Replaces GreenArmor
{
Radius 20
Height 16
Inventory.Pickupmessage "Armor Vest"
Inventory.Icon "ARMRA0"
Inventory.PickupSound "misc/armor_pkup"
Armor.Saveamount 50
Armor.MaxSaveAmount 125
+COUNTITEM
-INVENTORY.ALWAYSPICKUP
States
{
Spawn:
ARMR A -1
Stop
}
}[/spoiler]
User avatar
Rex Claussen
Developer
Developer
Posts: 2600
Joined: Tue Jul 11, 2006 18:36
Contact:

Post by Rex Claussen »

You may need to define a new player class, but I'm not sure.

Post this question in the ZDooM forums too.
User avatar
MauricioRocks
Posts: 30
Joined: Sun Feb 10, 2008 18:16
Location: São Paulo

Post by MauricioRocks »

Rex Claussen wrote:You may need to define a new player class, but I'm not sure.

Post this question in the ZDooM forums too.
I've tryed this before... I'm sure that don't exists any player properties or flags based on armor =\
User avatar
Hatchetman
Posts: 3
Joined: Fri Oct 03, 2008 2:34

Post by Hatchetman »

from what i have seen in my own travels, this should be a rather easy text edit, its in doomarmor.txt just make your item, make it give a certain amount then in the line that has how much it remembers, put the max value of that item,

the green armor gives 100 armor, but only remembers up to 100 armor, so if you have 99 armor it will only top it off to 100, the blue is the same, caps at 200, so it would be relatively simple to set it up, let me look at this a little bit more and ill post the txt needed to do it :)

i will comment it well also, so that adding in your sprite info will be easy :)

edit: you already knew this,... ugh, nvm, the max armor may have to be edited in the core before the compile.. code editing > scripting lol -- but defining a new player class may do it as well but hacking the exe could also do it, im not sure where to start tho, the only exe editing i did was when i was hosting a private wow server.. i learned a lot about c++ doing that .. ugh, but now thats in the past and um yeah, i dont know where to even start, personally i would keep the armor totals the same and just make armor that absorbs more/less based on the strength, im working on a new setup for armor myself, just working on the sprites at the moment.

and on the other note i have no idea of how to set up an alternate player class.
User avatar
wildweasel
DRD Team Admin (Inactive)
Posts: 2132
Joined: Wed Jun 29, 2005 22:00
Location: the Admincave!
Contact:

Post by wildweasel »

I thought you could specify a max amount per-item? Does this work?

Code: Select all

Inventory.MaxAmount 300
[edit] God dammit, this thread is five months old?!
User avatar
Rachael
Developer
Developer
Posts: 3646
Joined: Sat May 13, 2006 10:30

Post by Rachael »

Yeah, necroposters have been coming on the ZDoom forums in droves lately. ^^ Got a couple here, too. :P
User avatar
wildweasel
DRD Team Admin (Inactive)
Posts: 2132
Joined: Wed Jun 29, 2005 22:00
Location: the Admincave!
Contact:

Post by wildweasel »

I'm not terribly concerned about it; this place isn't very active in the first place and it is a little hard to tell how old things are considering the drop-off is so much slower...
Post Reply

Return to “Editing Help”