Yesterday on the irc channel Hati, Alevice, JademusSreg and nicoli_s have been talking about how to make heroes that have xp and levels. Hati found out a working solution that I present here.
<!-- BehaviorData.xml --><CBehaviorVeterancyid="ArchonLevelStatus"><VeterancyLevelArrayMinVeterancyXP="100"/><!-- Level 1 --><VeterancyLevelArrayMinVeterancyXP="300"/><!-- Level 2 --><VeterancyLevelArrayMinVeterancyXP="600"/><!-- Level 3 --><VeterancyLevelArrayMinVeterancyXP="1000"/><!-- Level 4 --><XPFractionindex="Kills"value="1.5"/><!-- Kill gives *1.5 XP --></CBehaviorVeterancy><!-- UnitData.xml --><!-- Hero --><!-- Gives an icon in the top right of the screen --><FlagArrayindex="Hero"value="1"/><!-- Set the different levels --><BehaviorArrayLink="ArchonLevelStatus"/><!-- Units giving XP --><KillXPvalue="50"/><!-- Number of XP given when killing the unit --><!-- The following are unknown --><DamageDealtXPvalue="1"/><DamageTakenXPvalue="1"/>
Example
Use the attached files with the Tutorial to reproduce the demo. Look for <!- - Change - -> for modified values.
Leads
We don't know yet how to do anything with the levels. If you can find how to add/edit spells when leveling that would be really nice.
Download Mirc ( http://www.mirc.com/ ). Hmm, don't you have any custom AI files or things like that in your SC2 installation folder? It may be the cause of all your troubles.
All the somewhat active mapping forums: Official forums, DarkBlizz, Unconfesional Design, Nibbits, TheHelper, IncGamers, sc2armory, hiveworkshop, wc3c.net
I didn't manage to finish the game :P Imo you should ask the user the difficulty
-easy
-hard ...
And spawn more or less units.
Sadly, there is a limit in the Sight value. It's about 1/5 of the map. In order to give full vision of the map, you can create an invisible unit that have the maximum sight and place it everywhere around the map.
<StatusColorsindex="Life"EmptyColor="255,0,0,255"/><!-- Inside StatusColors there is an Array. <ColorArray value="255,208,34,0"/> However, since we are inheriting default array and can't reset it ... We can't change the ColorArray :x--><BarWidthvalue="275"/><BarHeightvalue="20"/><BarOffsetvalue="10"/>
Custom Image
You can insert images into text with StringToText.
<!-- Create a base class that contains all the common features --><CUnitid="BaseMonster"><DefaultAcquireLevelvalue="Defensive"/><Speedvalue="2.8125"/><Accelerationvalue="2.5"/><LateralAccelerationvalue="46.0625"/><Radiusvalue="0.375"/><Sightvalue="1000"/><InnerRadiusvalue="0.375"/><SeparationRadiusvalue="0.375"/><MinimapRadiusvalue="0.375"/><KillDisplayvalue="Always"/><AbilArrayLink="attack"/><AbilArrayLink="move"/><CardLayouts><LayoutButtonsAbilCmd="attack,Execute"/></CardLayouts></CUnit><!-- Then create another virtual unit that defines more attributes --><CUnitid="BaseGround"parent="BaseMonster"><PlaneArrayindex="Ground"value="1"/><Collideindex="Ground"value="1"/></CUnit><!-- And now, create a bunch of units that inherit the previous unit. Now you just have to set the special values. It makes unit creation really easy--><CUnitid="Drone"parent="BaseGround"><LifeStartvalue="15"/><LifeMaxvalue="15"/><WeaponArrayLink="Drone"/><BehaviorArrayLink="DropCoin50"/></CUnit><CUnitid="Zergling"parent="BaseGround"><LifeStartvalue="50"/><LifeMaxvalue="50"/><WeaponArrayLink="Zergling"/><BehaviorArrayLink="DropCoin100"/></CUnit>
Creating a new unit from scratch
Creating a new unit from scratch in the XML files is a tedious process because there are a lot of hidden dependencies. After hours of work here is the minimal setup to create a new building based off a Pylon.
<!-- UnitData.xml --><CUnitid="TDMain"><LifeStartvalue="200"/><LifeMaxvalue="200"/><Foodvalue="200"/><Footprintvalue="Footprint4x4DestructibleRockDiagonal"/><PlaneArrayindex="Ground"value="1"/><Collideindex="Burrow"value="1"/><Collideindex="Ground"value="1"/><Collideindex="Structure"value="1"/><BehaviorArrayLink="PowerSource"/></CUnit><!-- ModelData.xml --><CModelid="TDMain"parent="Pylon"/><!-- ActorData.xml --><CActorUnitid="TDMain"parent="GenericUnitStandard"><Parentvalue="Pylon"/></CActorUnit><!-- parent="Pylon" does not work, this is really strange. You have to parent="GenericUnitStandard" which is the parent of Pylon. And you can use <Parent value="Pylon"/> to inherit from the Pylon attributes. All those are not working: parent="A" parent="B" parent="A,B" <Parent value="A" /> <Parent value="B" /> So it seems not possible to have more than a double inheritance-->
0
There is already a scripting API available. You can read the documentation here : http://www.sc2mapster.com/api-docs/functions/
However, they added only the strict minimum for the AI to work. Therefore you are really limited.
0
Yesterday on the irc channel Hati, Alevice, JademusSreg and nicoli_s have been talking about how to make heroes that have xp and levels. Hati found out a working solution that I present here.
Example
Use the attached files with the Tutorial to reproduce the demo. Look for
<!- - Change - ->
for modified values.Leads
We don't know yet how to do anything with the levels. If you can find how to add/edit spells when leveling that would be really nice.
0
Really nice. Thanks for the tip
0
Unit Aggressivity
In the UnitData.xml file you can set the aggressivity of a unit with:
0
Download Mirc ( http://www.mirc.com/ ). Hmm, don't you have any custom AI files or things like that in your SC2 installation folder? It may be the cause of all your troubles.
0
Can you drop by the IRC irc.freenode.net at #SC2Mapster Will be easier to find out the issue.
0
What version (language) of the game are you using?
0
When you set the Hero flag, it gives you an icon in the bottom right part of the screen ( http://www.wc3c.net/attachment.php?attachmentid=48428&stc=1&d=1269449460 )
Also, it seems to be possible to display a Level XP bar. ( http://dl.dropbox.com/u/1047844/Screenshot002.jpg )
Those informations are taken from a thread of wc3c.net : http://www.wc3c.net/showthread.php?t=109187
Haven't had the time to look into these settings yet.
0
Enemy left = 56! Woot :P
Thanks for the map, it's really fun :)
Going to test the new version.
Edit: You must be korean (or me a big noob), can't finish the map :P
0
All the somewhat active mapping forums: Official forums, DarkBlizz, Unconfesional Design, Nibbits, TheHelper, IncGamers, sc2armory, hiveworkshop, wc3c.net
I didn't manage to finish the game :P Imo you should ask the user the difficulty -easy -hard ... And spawn more or less units.
0
Vision
Sadly, there is a limit in the Sight value. It's about 1/5 of the map. In order to give full vision of the map, you can create an invisible unit that have the maximum sight and place it everywhere around the map.
Status Bar
You can change a little the status bar.
Custom Image
You can insert images into text with StringToText.
Also, you can change the unit icon in ActorData.xml. It will be green'ed :)
XML Inheritance
Creating a new unit from scratch
Creating a new unit from scratch in the XML files is a tedious process because there are a lot of hidden dependencies. After hours of work here is the minimal setup to create a new building based off a Pylon.
0
Hmm, got this error too but it still loads the game. That should be alright.
0
Woow, that's really nice :)
You really made a fun map off my TD. Could you record a little youtube video and I will make a news about it :)
0
At the moment, there is no easy way to make two different AI coexist unfortunatly :(
0
You can add every game file inside the map. Custom mods won't be needed, it will be possible to do it directly with normal map files :)