Looking for WML collaboration/tips.

The place to post your WML questions and answers.

Moderator: Forum Moderators

Forum rules
  • Please use [code] BBCode tags in your posts for embedding WML snippets.
  • To keep your code readable so that others can easily help you, make sure to indent it following our conventions.
Post Reply
User avatar
Kalajel
Posts: 213
Joined: March 18th, 2009, 10:42 pm
Location: Canada
Contact:

Looking for WML collaboration/tips.

Post by Kalajel »

Hi everyone!

I was told this was the place to request the help of WMl programmers…

So basically, here's the situation; I've had this idea for a multiplayer scenario for a while now. I made the map, made a few ai-only runs to test it and check if it was balanced (I'll probably try an all-player run soon), but now I need to programm all those little interesting bits into teh scenario. I've checked the wiki to learn how to do WML, and I've tried it, but so far all I've done is fail miserably… So now I'm looking for someone who could either help me, or give me hints on how to program this thing.

Basically, my scenario in higly inspired by the onld SNES game Gemfire (I've even entitled my scenario Gemwars, yeah, original! :lol2: ). The main goal would be to capture the other player's gems, which are bounded to a powerful unit (monsters or wizards; I haven't quite made up my mind yet…). And while the palyers battle it out, a bunch of random stuff would happen…

So that's pretty much it for now, if you have questions, please ask them, I'll be happy to go in more details…
User avatar
Ken_Oh
Moderator Emeritus
Posts: 2178
Joined: February 6th, 2006, 4:03 am
Location: Baltimore, Maryland, USA

Re: Looking for WML collaboration/tips.

Post by Ken_Oh »

If you have any specific questions, then ask them. As it is, I can't find much use in this topic.
User avatar
Kalajel
Posts: 213
Joined: March 18th, 2009, 10:42 pm
Location: Canada
Contact:

Re: Looking for WML collaboration/tips.

Post by Kalajel »

Hmm, specific questions huh? Well I'd be asking quite a lot of those becasue I would like to know how to program the whole thing (random terrain change, randum stuff appeearing on the battlefield à la Living Caves, putting extra units on the map at the start of the scenario, etc…).

Well, one thing I did though was to try and add an extra unit at the start of a scenario… sort of like the example they gave on the wiki to add a spearman (I even tried using that exact same code just in case)… Well, it didn't worked, I either got an error message telling me this unit did not exist or the scenario started as usual, but without the extra unit and with no music…

Edit: Oh, I managed to find an old copy of my scenario, here are the unis I tried to add;

Code: Select all

[event]
name=prestart
   [unit_type]
   type=Necromancer
   x,y=19,9
   side=1
   [/unit_type]
[/event]
[event]
name=prestart
   [unit_type]
   type=Mage_of_Light
   x,y=47,10
   side=2
   [/unit_type]
[/event]
[event]
name=prestart
   [unit_type]
   type=Shyde
   x,y=9,32
   side=3
   [/unit_type]
[/event]
[event]
name=prestart
   [unit_type]
   type=Diviner
   x,y=63,31
   side=4
   [/unit_type]
[/event]
[event]
name=prestart
   [unit_type]
   type=Mage_Silver
   x,y=20,54
   side=5
   [/unit_type]
[/event]
[event]
name=prestart
   [unit_type]
   type=Necro_Lich
   x,y=49,51
   side=6
   [/unit_type]
[/event]
User avatar
zookeeper
WML Wizard
Posts: 9742
Joined: September 11th, 2004, 10:40 pm
Location: Finland

Re: Looking for WML collaboration/tips.

Post by zookeeper »

Types of units have nothing to do with filenames, it's the id= of the [unit_type] that you need to use (so use Lich, not Necro_Lich). Also [unit_type] is only for defining new unit types, [unit] is for spawning single units.

If in doubt, always first find an example in some mainline campaign, for example. If you've ever played one then you'll know that new units are placed on the map all the time, so there's plenty of examples to examine.
arielbys
Posts: 51
Joined: May 6th, 2008, 2:57 pm

Re: Looking for WML collaboration/tips.

Post by arielbys »

Kalajel wrote:Hmm, specific questions huh? Well I'd be asking quite a lot of those becasue I would like to know how to program the whole thing (random terrain change, randum stuff appeearing on the battlefield à la Living Caves, putting extra units on the map at the start of the scenario, etc…).

Well, one thing I did though was to try and add an extra unit at the start of a scenario… sort of like the example they gave on the wiki to add a spearman (I even tried using that exact same code just in case)… Well, it didn't worked, I either got an error message telling me this unit did not exist or the scenario started as usual, but without the extra unit and with no music…

Edit: Oh, I managed to find an old copy of my scenario, here are the unis I tried to add;

Code: Select all

[event]
name=prestart
   [unit_type]
   type=Necromancer
   x,y=19,9
   side=1
   [/unit_type]
[/event]
[event]
name=prestart
   [unit_type]
   type=Mage_of_Light
   x,y=47,10
   side=2
   [/unit_type]
[/event]
[event]
name=prestart
   [unit_type]
   type=Shyde
   x,y=9,32
   side=3
   [/unit_type]
[/event]
[event]
name=prestart
   [unit_type]
   type=Diviner
   x,y=63,31
   side=4
   [/unit_type]
[/event]
[event]
name=prestart
   [unit_type]
   type=Mage_Silver
   x,y=20,54
   side=5
   [/unit_type]
[/event]
[event]
name=prestart
   [unit_type]
   type=Necro_Lich
   x,y=49,51
   side=6
   [/unit_type]
[/event]
It looks like you need WML fixes

Can you post your scenario as a zip (or (.tar).gz/bz2)? I think you need major fixing:

1. Change the unit_type to unit. unit_type in 1.5+ is what unit inside [units] is in 1.4 (define a new unit type)
2. Merge the prestart events. You can put more then 1 action/event.
Post Reply