Problem with new mp scenario

Discussion of all aspects of multiplayer development: unit balancing, map development, server development, and so forth.

Moderator: Forum Moderators

Post Reply
User avatar
Tomsik
Posts: 1401
Joined: February 7th, 2005, 7:04 am
Location: Poland

Problem with new mp scenario

Post by Tomsik »

in second turn should be do "{GATE_2}" but its not work, why?

CODE:

Code: Select all

[multiplayer] 
   id=room_war
   name= _ "room wars 0.1" 
  map_data="WWWWWWWWWWWWWWWWWWWW
WoooWffgWwwwWgffWooo
Wo3oggtgWwYwWgtggo4o
WWogWWmWWWwWWWmWWgoW
WWWfggWgggggggWggfWW
WWWftgWmtfgftmWgtfWW
WWWWggWWmWgWmWWggWWW
WmmgWgccWIIIWccgWgmm
WmtgggtcgIBIgctgggtm
WWmWWgcWWWIWWWcgWWmW
WWWfggWmmfgfmmWggfWW
WWWftgWgtgggtgWgtfWW
WWWggWWWgWgWgWWWggWW
WoooWgmgWwwwWgmgWooo
Wo2ogftgWwYwWgtfgo1o
WWoWWWfWWWwWWWfWWWoW
WWWWWWWWWWWWWWWWWWWW
WWWWWWWWWWWWWWWWWWWW
WWWWWWWWWWWWWWWWWWWW
WWWWWWWWWWWWWWWWWWWW"

description= _ "room wars"
   turns=90 

   {DAWN} 
   {MORNING} 
   {AFTERNOON} 
   {DUSK} 
   {FIRST_WATCH} 
   {SECOND_WATCH} 

############## MACRO DEFINE ##############

#define SIDE_SET SIDE
   [side] 
   side={SIDE} 
   team_name={SIDE} 
   canrecruit=1 
   controller=human 
   [/side] 
#enddef

#define GATE_1
[if]
[variable]
name=gate
numerical_equals=1
[/variable]
[then]
[terrain]
letter="W"
x=4,6,18,16,5,17,11,11,9,13,6,16,11,11,4,18,5,17,5,17,
y=4,7,4,7,9,9,5,7,9,9,10,10,11,13,13,13,15,15,3,3
[/terrain]
[terrain]
letter="g"
x=5,17,9,13,8,14,7,15,10,12,6,16,5,17,9,13,8,14,7,15,10,12,6,16,17,5
y=2,2,3,3,4,4,6,6,7,7,7,7,16,16,15,15,13,13,12,12,10,10,10,10,9,9
[/terrain]
[set_variable]
name=moved_gate
varible=1
[/set_variable]
[set_variable]
name=gate
variable=2
[/set_variable]
[/then]
[/if]
#enddef

#define GATE_2
[if]
[variable]
name=moved_gate
numerical_equals=0
[/variable]
[then]
[if]
[variable]
name=gate
numerical_equals=2
[/variable]
[then]
[terrain]
letter="g"
x=4,6,18,16,5,17,11,11,9,13,6,16,11,11,4,18,5,17,5,17,
y=4,7,4,7,9,9,5,7,9,9,10,10,11,13,13,13,15,15,3,3
[/terrain]
[terrain]
letter="W"
x=5,17,9,13,8,14,7,15,10,12,6,16,5,17,9,13,8,14,7,15,10,12,6,16,17,5
y=2,2,3,3,4,4,6,6,7,7,7,7,16,16,15,15,13,13,12,12,10,10,10,10,9,9
[/terrain]
[set_variable]
name=gate
variable=1
[/set_variable]
[/then]
[/if]
[/then]
[/if]
#enddef

##########################################

{SIDE_SET 1}
{SIDE_SET 2}
{SIDE_SET 3}
{SIDE_SET 4}

[event]
name=prestart
[set_variable]
name=gate
value=1
[/set_variable]
[set_variable]
name=moved_gate
value=0
[/set_variable]

[/event]

[event]
name=new turn
first_time_only=no
[set_variable]
name=moved_gate
value=0
[/set_variable]
{GATE_1}
{GATE_2}
[/event]
 
[/multiplayer]
Hieronymus
Posts: 41
Joined: February 24th, 2005, 2:10 pm

Post by Hieronymus »

In GATE_1:

Code: Select all

[set_variable]
name=moved_gate
varible=1
[/set_variable]
"varible" should be "variable" :-)

May I ask what you are trying to do in this scenario?
User avatar
Tomsik
Posts: 1401
Joined: February 7th, 2005, 7:04 am
Location: Poland

Post by Tomsik »

:oops: in three places i write "variable", should be "value" :oops:
i try to do:
on start of each turn walls changing positions.

now i have other problem in 6,10 16,10 6,7 6,10 5,9 and 17,9 in 2nd turn(i dont count start) is walls, there should not be a wall, i writed but nothing ...
CODE:

Code: Select all

[multiplayer] 
   id=room_war
   name= _ "room wars 0.1 b" 
  map_data="WWWWWWWWWWWWWWWWWWWW
WoooWffgWwwwWgffWooo
Wo3oggtgWwYwWgtggo4o
WWogWWmWWWwWWWmWWgoW
WWWfggWgggggggWggfWW
WWWftgWmtfgftmWgtfWW
WWWWggWWmWgWmWWggWWW
WmmgWgccWIIIWccgWgmm
WmtgggtcgIBIgctgggtm
WWmWWgcWWWIWWWcgWWmW
WWWfggWmmfgfmmWggfWW
WWWftgWgtgggtgWgtfWW
WWWggWWWgWgWgWWWggWW
WoooWgmgWwwwWgmgWooo
Wo2ogftgWwYwWgtfgo1o
WWoWWWfWWWwWWWfWWWoW
WWWWWWWWWWWWWWWWWWWW
WWWWWWWWWWWWWWWWWWWW
WWWWWWWWWWWWWWWWWWWW
WWWWWWWWWWWWWWWWWWWW"

description= _ "room wars"
   turns=90 

   {DAWN} 
   {MORNING} 
   {AFTERNOON} 
   {DUSK} 
   {FIRST_WATCH} 
   {SECOND_WATCH} 

############## MACRO DEFINE ##############

#define SIDE_SET SIDE
   [side] 
   side={SIDE} 
   team_name={SIDE} 
   canrecruit=1 
   controller=human 
   [/side] 
#enddef

#define GATE_1
[if]
[variable]
name=gate
numerical_equals=1
[/variable]
[then]
[terrain]
letter="W"
x=4,6,18,16,5,17,11,11,9,13,6,16,11,11,4,18,5,17,5,17,
y=4,7,4,7,9,9,5,7,9,9,10,10,11,13,13,13,15,15,3,3
[/terrain]
[terrain]
letter="g"
x=5,17,9,13,8,14,7,15,10,12,6,16,5,17,9,13,8,14,7,15,10,12,6,16,17,5
y=2,2,3,3,4,4,6,6,7,7,7,7,16,16,15,15,13,13,12,12,10,10,10,10,9,9
[/terrain]
[set_variable]
name=moved_gate
value=1
[/set_variable]
[set_variable]
name=gate
value=2
[/set_variable]
[/then]
[/if]
#enddef

#define GATE_2
[if]
[variable]
name=moved_gate
numerical_equals=0
[/variable]
[then]
[if]
[variable]
name=gate
numerical_equals=2
[/variable]
[then]
[terrain]
letter="W"
x=5,17,9,13,8,14,7,15,10,12,5,17,9,13,8,14,7,15,10,12
y=2,2,3,3,4,4,6,6,7,7,16,16,15,15,13,13,12,12,10,10
[/terrain]
[terrain]
letter="g"
x=4,6,18,16,5,17,11,11,9,13,6,16,11,11,4,18,5,17,5,17,6,6,16,16,5,17
y=4,7,4,7,9,9,5,7,9,9,10,10,11,13,13,13,15,15,3,3,7,10,7,10,9,9
[/terrain]
[set_variable]
name=gate
value=1
[/set_variable]
[/then]
[/if]
[/then]
[/if]
#enddef

##########################################

{SIDE_SET 1}
{SIDE_SET 2}
{SIDE_SET 3}
{SIDE_SET 4}

[event]
name=prestart
[set_variable]
name=gate
value=1
[/set_variable]
[set_variable]
name=moved_gate
value=0
[/set_variable]

[/event]

[event]
name=new turn
first_time_only=no
[set_variable]
name=moved_gate
value=0
[/set_variable]
{GATE_1}
{GATE_2}
[/event]
 
[/multiplayer]
PS: if someone wanna try it just copy that code to cfg file and place it in data/multiplayer/scenarios
User avatar
Tomsik
Posts: 1401
Joined: February 7th, 2005, 7:04 am
Location: Poland

Post by Tomsik »

maybe someone know how to help me?
ott
Inactive Developer
Posts: 838
Joined: September 28th, 2004, 10:20 am

Post by ott »

Run the game with commandline option

Code: Select all

--log-info=all
which gives lots of debug output, including showing the errors in your scenario code.
This quote is not attributable to Antoine de Saint-Exupéry.
User avatar
Tomsik
Posts: 1401
Joined: February 7th, 2005, 7:04 am
Location: Poland

Post by Tomsik »

i have both systems but i playing games on m$ system and this dont work on this system
Rhuvaen
Inactive Developer
Posts: 1272
Joined: August 27th, 2004, 8:05 am
Location: Berlin, Germany

Post by Rhuvaen »

tomsik wrote:maybe someone know how to help me?
How? What's wrong? I tried this, copied it into a file and ran it. It seemed to work. The connections between the rooms change each turn. There wasn't a block in 6,10 on turn two or three, as you wrote. If it's not working as you like, then it's probably just the coordinates.

BTW, I found the shifting walls incredibly annoying... :?
User avatar
Tomsik
Posts: 1401
Joined: February 7th, 2005, 7:04 am
Location: Poland

Post by Tomsik »

i check coordinates and i dont find any bad things its problem :?
Post Reply