@vjeux: Go hmmm.. can't really finish the maps if you can't touch the terrain ATM then?
Well, you can start it at least :) And you will be able to understand the underlying system of the maps. The editor will hide a great deal of complexity.
What we can do at the moment is very similar to what is going to be possible with the editor
Galaxy Editing: There will be some kind of wysiwyg thing to code, but nothing that we can't already do
XML Editing: There will be some kind of excel sheet that allow us to edit the values. Will speed up a little the process but does not give more power
Terrain Editing: This is where the editor is needed. It's not possible to edit the terrain at all atm. It is stored in binary form that is impossible to edit with a text editor
All the functions are not available yet, only the strict minimum required for the AI to work is in. This will allow us to make better things.
For the Tower Defense I've come across a problem: giving resources to the player. Since there is no PlayerSetResource() function yet, this is pretty hard. Here is a little recap of my findings.
The function MeleeInitResource gives the amount of mineral and vespene you want but it does it only one time. This is really strange but works that way. So it can't really be used.
Mineral
A way to get mineral is to gather it from a mineral field. I haven't managed to build a MineralField from a building. The solution is to make a unit gatherable. This is done adding those 3 lines inside UnitData.xml
Since you don't want your worker to get back and forth to the main building, you can set the worker to be a resource dropping site.
<ResourceDropOffindex="Minerals"value="1"/>
Now, the unit will act like a coin. You click on it, the worker will collect it and get money.
Spawn the unit
You can now order any AI to train the harvestable unit using that Galaxy line:
// player, priority, town, unit, countAITrain(2,1,0,"Larva",1);
In the Tower Defense perspective, it would be nice to have the mineral pop when the unit dies. It is possible! We are going to use the Zerg Building. There are many layers of XML to get this working, this is kinda complicated to edit it without the editor.
There is a <RequiredAlliance value="Control"/> field. However, the only possible values are (Passive, Vision, Control, Spend, Trade, SeekHelp, GiveHelp, Chat, Defeat, Pushable). None of them include being enemy.
It is possible to set an alliance between an AI and a player. The bad thing is that it cannot be done inside the map, you have to do through the launcher. And at the moment there is no command line launcher that is able to do it. Also, we don't want to be dependant from a particular launcher.
A possible lead would be to use an ability to take control of the enemy unit. However it would require too much interaction and many layers of XML.
Solution
Arthas- just gave me a solution: In the <CEffectCreateUnit node we can add this magic line:
<SpawnOwnerValue="Neutral"/>
This allow us to make a coin spawn on unit death. The unit will be neutral therefore harvestable. You can now give money to the player ! This involves many XML editing but it is possible and in an user friendly process.
pointp;if(command=="-moveto"){p=Point(StringToFixed(StringWord(message,2)),StringToFixed(StringWord(message,3)));// Update the order code to use this point}// Sample usage:// -moveto 53.3 12.2
Copy "Starcraft II Beta/Versions/Base13891/" to "Starcraft II Beta/Versions/Base10000/"
Copy "Tutorial/Export/patch.SC2Archive" to "Starcraft II Beta/Versions/Base10000/patch.SC2Archive"
Run "Tutorial/launch_map.bat"
You should see a map with 4 drones and one of them is yours
Now, you just have to edit the galaxy and xml files inside the Files/ folder. Run the launch_map.bat and Tadaa, all your modifications are taken in account directly.
In order to make the learning curve easier I've added examples of basic code you would probably want to write. If you want to get deeper you can dig into the Documentation.
Well, it's not a battle about who is going to document the most. The goal is to have as many thing documented as possible. Small contributions are needed as well as big ones.
Anyway you are right, go back to work and don't leave your cavern until it's perfect! ;) Then you will have all our deserved congratulations.
It is really sexy. I don't know if you have seen but you can create a new Asset and have a dedicated page on sc2mapster. It will allow you to manage different versions, have a full description and coverage. It should be easier to manage than mediafire upload link :)
(You can use < < code > > ... < < /code > > to make things appear nicer :P)
I don't really understand what you are trying to achieve with your SetAlliance function. You call a lot of times GetAlliance that returns a boolean but you are not using it ...
0
Well, you can start it at least :) And you will be able to understand the underlying system of the maps. The editor will hide a great deal of complexity.
0
Pretty much yeah :)
What we can do at the moment is very similar to what is going to be possible with the editor
All the functions are not available yet, only the strict minimum required for the AI to work is in. This will allow us to make better things.
0
Here is a little demonstration video:
You can test it adding the files attached inside the Tutorial
Look for the
comments in the following files: UnitData.xml, EffectData.xml, BehaviorData.xml and AbilData.xml0
Hello,
For the Tower Defense I've come across a problem: giving resources to the player. Since there is no PlayerSetResource() function yet, this is pretty hard. Here is a little recap of my findings.
MeleeInitResource
The function MeleeInitResource gives the amount of mineral and vespene you want but it does it only one time. This is really strange but works that way. So it can't really be used.
Mineral
A way to get mineral is to gather it from a mineral field. I haven't managed to build a MineralField from a building. The solution is to make a unit gatherable. This is done adding those 3 lines inside UnitData.xml
You want to get the resources instantly:
Since you don't want your worker to get back and forth to the main building, you can set the worker to be a resource dropping site.
Now, the unit will act like a coin. You click on it, the worker will collect it and get money.
Spawn the unit
You can now order any AI to train the harvestable unit using that Galaxy line:
In the Tower Defense perspective, it would be nice to have the mineral pop when the unit dies. It is possible! We are going to use the Zerg Building. There are many layers of XML to get this working, this is kinda complicated to edit it without the editor.
Can't harvest enemy units
There is a
<RequiredAlliance value="Control"/>
field. However, the only possible values are (Passive, Vision, Control, Spend, Trade, SeekHelp, GiveHelp, Chat, Defeat, Pushable). None of them include being enemy.It is possible to set an alliance between an AI and a player. The bad thing is that it cannot be done inside the map, you have to do through the launcher. And at the moment there is no command line launcher that is able to do it. Also, we don't want to be dependant from a particular launcher.
A possible lead would be to use an ability to take control of the enemy unit. However it would require too much interaction and many layers of XML.
Solution
Arthas- just gave me a solution: In the
<CEffectCreateUnit
node we can add this magic line:This allow us to make a coin spawn on unit death. The unit will be neutral therefore harvestable. You can now give money to the player ! This involves many XML editing but it is possible and in an user friendly process.
0
All the d?() functions print text inside the debug trigger window. In order to make it appear you must be in windowed mode :)
0
Would not be hard. Something like
0
Hello,
At the moment, creating a map is a hardcore process, this is why I've packaged many tools together to make map editing easy.
http://www.sc2mapster.com/maps/tutorial-how-get-started/
How to start:
Starcraft II Beta/Versions/Base13891/
" to "Starcraft II Beta/Versions/Base10000/
"Tutorial/Export/patch.SC2Archive
" to "Starcraft II Beta/Versions/Base10000/patch.SC2Archive
"Tutorial/launch_map.bat
"Now, you just have to edit the galaxy and xml files inside the
Files/
folder. Run the launch_map.bat and Tadaa, all your modifications are taken in account directly.In order to make the learning curve easier I've added examples of basic code you would probably want to write. If you want to get deeper you can dig into the Documentation.
I hope you are going to start making maps :)
0
Well, it's not a battle about who is going to document the most. The goal is to have as many thing documented as possible. Small contributions are needed as well as big ones.
Anyway you are right, go back to work and don't leave your cavern until it's perfect! ;) Then you will have all our deserved congratulations.
0
http://webchat.freenode.net/
Just use this web chat. Enter your nick and "sc2mapster" as channel
0
At the moment the only functions in the API are those strictly needed for the AI to work. We should see a lot more coming with the editor.
This is also why this is important to document what we have right now, because if we don't we are going to be drown with the amount of functions :)
0
Bifuu, this is an awesome job!
Thanks a lot :)
0
The error message is really strange. The max shouldn't be Passive but 0 or something. I guess the loader is doing something strange.
0
Hey!
It is really sexy. I don't know if you have seen but you can create a new Asset and have a dedicated page on sc2mapster. It will allow you to manage different versions, have a full description and coverage. It should be easier to manage than mediafire upload link :)
0
Hey
(You can use < < code > > ... < < /code > > to make things appear nicer :P)
I don't really understand what you are trying to achieve with your SetAlliance function. You call a lot of times GetAlliance that returns a boolean but you are not using it ...
0
Welcome :)