View Full Version : [Support] Custom unit not working.
Amgoz1STGS
01-06-2011, 01:55 AM
My custom unit won't load in the editor so I placed one directly in the entitylist file, but ingame it looks like ****(red checkerboard texture) and just stands still like a ****in moron when it should be running around hitting people.
<?xml version="1.0" encoding="UTF-8"?>
<creep
name="Creep_Accursed_LevelOne"
team="Hellbourne"
icon="icon.tga"
portrait="icon.tga"
model="model.mdf"
skin=""
passiveeffect="effects/body.effect"
spawneffect=""
respawneffect="/shared/effects/respawn.effect"
selectedsound="sounds/voice/select_%.wav"
selectedflavorsound="sounds/voice/select_flavour_%.wav"
confirmmovesound="sounds/voice/move_%.wav"
confirmattacksound="sounds/voice/attack_%.wav"
nomanasound="sounds/voice/no_mana.wav"
cooldownsound="sounds/voice/cooldown.wav"
announcersound="sounds/voice/hero_select.wav"
tauntedsound="sounds/voice/taunt_prior.wav"
tauntkillsound="sounds/voice/taunt_after.wav"
preglobalscale="1.665"
modelscale="1.0"
effectscale="0.9"
boundsheight="112"
boundsradius="24"
selectionradius="52"
targetoffset="0 0 92"
movespeed="300"
turnrate="450"
turnsmoothing="0.1"
maxhealth="550"
healthregen="2.0"
maxmana="300"
manaregen="2.0"
armor="4.0"
magicarmor="3.0"
inventory0="Ability_Accursed1"
inventory1="Ability_Accursed2"
inventory2="Ability_Accursed3"
inventory3="Ability_Accursed4"
inventory4=""
inventory5=""
inventory6=""
inventory8=""
attackduration="1000"
attackactiontime="450"
attackcooldown="1700"
attackdamagemin="33"
attackdamagemax="37"
attacknumanims="3"
attackoffset="0 30 100"
attackprojectile=""
attackrange="110"
attackstarteffect=""
attackactioneffect=""
attackimpacteffect="/shared/sounds/impacts/impact_flesh.effect"
attacktype="melee"
combattype="Melee"
aggrorange="600"
sightrangeday="1800"
sightrangenight="800"
wanderrange="250"
experiencebounty="50"
goldbountymin="40"
goldbountymax="50"
>
<modifier key="ability3" modpriority="100"
attackanim="ability_3_attack_%"
attacknumanims="3"
/>
</creep>
FlameStick
01-06-2011, 05:01 AM
team="Hellbourne"
icon="icon.tga" -> put the accursed link icon
portrait="icon.tga" -> same as above
model="model.mdf" -> put the accursed model
So put this
icon="/heroes/accursed/icon.tga"
portrait="/heroes/accursed/icon.tga"
model="/heroes/accursed/model.mdf"
something like this
EDITED : i replaced \ with a /
Oloko
01-06-2011, 06:58 AM
Watch out, its not model="\heroes\accursed\model.mdf" but model="/heroes/accursed/model.mdf"
Also, make sure to load your map twice before testing it. Some people says that adding the base.gamemechanics file into your map let you test without having to load the map two times, but it doesn't work for me.
FlameStick
01-06-2011, 07:33 AM
Watch out, its not model="\heroes\accursed\model.mdf" but model="/heroes/accursed/model.mdf"
Also, make sure to load your map twice before testing it. Some people says that adding the base.gamemechanics file into your map let you test without having to load the map two times, but it doesn't work for me.
i noticed sometimes you write with a / and on some files with \ whats the difference?
Oloko
01-06-2011, 07:43 AM
i noticed sometimes you write with a / and on some files with \ whats the difference?
Oh, I never noticed. I don't know if it makes a difference. It's the first time I see this, it look like it's only used four time in all the entities.
Amgoz1STGS
01-06-2011, 02:03 PM
The new filepath solved the texture issue, but the units are still uncapable of attacking or doing anything at all.
tojooko
01-06-2011, 02:27 PM
Hey, i hope i can help you. You can change ur spawning creep in game_settings.cfg file:
Set "g_creepTeam1Melee" "Creep_LegionMelee"
Set "g_creepTeam1Ranged" "Creep_LegionRanged"
Set "g_creepTeam1Siege" "Creep_LegionSiege"
Set "g_creepTeam2Melee" "Creep_HellbourneMelee"
Set "g_creepTeam2Ranged" "Creep_HellbourneRanged"
Set "g_creepTeam2Siege" "Creep_HellbourneSiege"There are more interesting parametrs here, but it should be enough. Unluckly you can still have only 3 types of creeps, but maybe it will be enough :P.
Don't forget to add your Creep_Accursed_LevelOne to entities list (\stringtables\entities_en.str). I suppose game_settings.cfg should be in resources folder ( didn't modified yet) and entities_en.str must be in resources\stringtables
PS. I think you must remove team of this creep becouse it will be spawned automaticly.
Amgoz1STGS
01-06-2011, 02:51 PM
Hey, i hope i can help you. You can change ur spawning creep in game_settings.cfg file:
Set "g_creepTeam1Melee" "Creep_LegionMelee"
Set "g_creepTeam1Ranged" "Creep_LegionRanged"
Set "g_creepTeam1Siege" "Creep_LegionSiege"
Set "g_creepTeam2Melee" "Creep_HellbourneMelee"
Set "g_creepTeam2Ranged" "Creep_HellbourneRanged"
Set "g_creepTeam2Siege" "Creep_HellbourneSiege"There are more interesting parametrs here, but it should be enough. Unluckly you can still have only 3 types of creeps, but maybe it will be enough :P.
Don't forget to add your Creep_Accursed_LevelOne to entities list (\stringtables\entities_en.str). I suppose game_settings.cfg should be in resources folder ( didn't modified yet) and entities_en.str must be in resources\stringtables
PS. I think you must remove team of this creep becouse it will be spawned automaticly.
The creeps are not supposed to spawn like lane creeps, this is more like an arena/survival map. My stringtable is set up correctly and the name works fine ingame.
There is obviously something wrong with my entity files since they don't show up in the editor like my custom items and so on does, no idea what though.
tojooko
01-06-2011, 03:11 PM
There is no easy way to place them in editor yet ( New entities are not visible). You can open console and manually define le_entityType (by typing le_entityType "Creep_Accursed_LevelOne" ) and spawn them (it will be teapot in editor and creep in game). As i said ealier you must add it into entities_en.str.
Amgoz1STGS
01-06-2011, 03:25 PM
There is no easy way to place them in editor yet ( New entities are not visible). You can open console and manually define le_entityType (by typing le_entityType "Creep_Accursed_LevelOne" ) and spawn them (it will be teapot in editor and creep in game). As i said ealier you must add it into entities_en.str.
I have already added it to that stringtable, I'm gonna try that define command though, but none of this explains why they act like statues.
Oloko
01-06-2011, 03:53 PM
I have already added it to that stringtable, I'm gonna try that define command though, but none of this explains why they act like statues.
Try changing their entity type to "neutral" and not "creep" since they are not real creeps.
tojooko
01-06-2011, 04:30 PM
Hmm can you check 1 more thing?Does their armor reduction is equal 0 even if they got some armor? My hero wasn't able to attack with this bug and your answer may help me in solving your problem.
Amgoz1STGS
01-06-2011, 05:59 PM
Yeah their armor reduction is 0% no matter the armor rating.
I dunno what happened but suddenly Accursed had proper armor and did not act like pubtrash, he attacked heroes and his passive actually worked. What is this.
tojooko
01-07-2011, 08:54 AM
I hope that in order to solve your problem you must just load twice map (Disconnect from team menu and load it again). If it doesn't test this creep. (Green :accu: looks strange:P )
<?xml version="1.0" encoding="UTF-8"?>
<creep
name="Creep_Accu"
icon="/heroes/accursed/icon.tga"
portrait="/heroes/accursed/icon.tga"
model="/heroes/accursed/model.mdf"
skin=""
passiveeffect="/heroes/accursed/effects/body.effect"
spawneffect=""
respawneffect=""
selectsound=""
orderconfirmedsound=""
preglobalscale="1.665"
modelscale="1.0"
effectscale="0.9"
boundsheight="112"
boundsradius="24"
selectionradius="52"
targetoffset="0 0 92"
movespeed="325"
turnrate="320"
turnsmoothing="0.05"
maxhealth="550"
healthregen="0.5"
maxmana="0"
manaregen="0"
armor="2"
magicarmor="3"
cancarryitems="false"
inventory0=""
inventory1=""
inventory2=""
inventory3=""
inventory4=""
inventory5=""
inventory6=""
inventory7=""
attackduration="1000"
attackactiontime="600"
attackcooldown="1000"
attackdamagemin="19,36"
attackdamagemax="23,44"
attacknumanims="3"
attackoffset="0 30 100"
attackprojectile=""
attackrange="110"
attackstarteffect=""
attackactioneffect=""
attackimpacteffect="/shared/sounds/impacts/impact_flesh.effect"
attacktype="melee"
combattype="Melee"
aggrorange="500"
proximityrange="200"
sightrangeday="1400"
sightrangenight="800"
experiencebounty="62"
goldbountymin="38"
goldbountymax="47"
corpsetime="10000"
corpsefadetime="5000"
corpsefadeeffect="/shared/effects/corpse_sink.effect"
attackdamageminpercharge="1"
attackdamagemaxpercharge="1"
maxhealthpercharge="10"
>
</creep>