Just wanted to make something different but... crushed it
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.
Just wanted to make something different but... crushed it
I need some help here:
maybe someone can find my mistake as for me it just says that the scenario is unknown :/
maybe someone can find my mistake as for me it just says that the scenario is unknown :/
Code: Select all
#textdomain wesnoth-Science_Miracle
[scenario]
id="05_TheForest"
name= _ "The Forest"
map_data="{~add-ons/Science_Miracle/maps/02_The_Forest.map}"
{DEFAULT_SCHEDULE}
{DEFAULT_MUSIC_PLAYLIST}
turns=-1
victory_when_enemies_defeated=no
next_scenario=null
[story]
[part]
story=_ "To reach the city of Zar our heroes had to travel through a big Forest. This will be a tough march."
background=backgrounds/ScMi_Forest.png
[/part]
[/story]
[side]
profile="data/add-ons/Science_Miracle/images/Faces/Serena.png"
side=1
id=Serena
type=ScMi_Serena
name= _ "Serena"
gender=female
canrecruit=yes
controller=human
team_name=Serena
gold=30
unrenamable=yes
shroud=yes
x=16
y=74
recruit=
[/side]
[side]
side=2
id=Allys
team_name=Serena
controller=ai
shroud=yes
[/side]
[side]
side=3
id=Enemys
team_name=Enemys
controller=ai
shroud=yes
[/side]
[event]
name=prestart
{PLACE_IMAGE items/ScMi_House.png 19 73}
{PLACE_IMAGE items/ScMi_House.png 28 59}
{PLACE_IMAGE items/ScMi_House.png 6 58}
{PLACE_IMAGE items/ScMi_House2.png 25 39}
{PLACE_IMAGE items/ScMi_House.png 11 22}
{PLACE_IMAGE items/ScMi_House.png 32 14}
{PLACE_IMAGE items/ScMi_House2.png 4 12}
{PLACE_IMAGE items/ScMi_Gohere.png 22 6}
[objectives]
side=1
[objective]
condition=win
description= _ "Find the city entrance."
[/objective]
[objective]
condition=lose
description= _ "Death of Yasmin or Zeth or Serena."
[/objective]
[/objectives]
[/event]
[event]
name=enter_hex
[filter]
y=60
[/filter]
[event]
name=enter_hex2
[filter]
x=8
[/filter]
{GENERIC_UNIT 3 ScMi_Snake 8 57}
{GENERIC_UNIT 3 ScMi_Snake 8 58}
{GENERIC_UNIT 3 ScMi_Snake 8 59}
{NAMED_GENERIC_UNIT 2 ScMi_Scientist 6 58 (Scientist) (_"Scientist")}
[message]
speaker=Scientist
message= _ "Hey you there. Could you help me with this Snakes?"
[/message]
[message]
speaker=Serena
message= _ "Sure why not. They are no match for us."
[/message]
[message]
speaker=Scientist
message= _ "Thank you."
[/message]
[/event]
[/event]
[event]
name=killed_snakes
[filter]
[if]
[have_unit]
side=3
count=0
[/have_unit]
[/if]
[/filter]
[message]
speaker=Scientist
message= _ "Thanks for the help. I need to talk to you. I wait inside the house."
[/message]
{STORE_UNIT Scientist}
[store_gold]
side=1
variable=side_gold
[/store_gold]
[event]
name=enter_hex
[filter]
x=6
y=58
[/filter]
{RESTORE_UNIT Scientist}
[message]
speaker=Scientist
message= _ "Welcome. While we fought my daughters begun to admire you I wanted to give you some Gold. But as i entered the house they wanted to come with you. I can not let both of them go with you."
[/message]
[message]
speaker=Scientist
message= _ "I can give you 80 Gold or I can let my elder daughter Veronika go with you for 40 Gold. My younger daughter is too young to acompany you so i can't let her go with you."
[option]
label=_"I take the extra 80 Gold!
[command]
[message]
speaker=Scientist
message=_"Very well here you go 80 Gold!"
[message]
[gold]
side=1
amount=80
[/gold]
[/command]
[/option]
[if]
[valiable]
name=side_gold
greater_than_equal_to=40
[/variable]
[then]
[option]
label=_"I would wish that Veronika come with me!"
[command]
[message]
speaker=Scientist
message=_"Do you hear that Veronika. Get your stuff you can go with them."
[/message]
{NAMED_GENERIC_LOYAL_UNIT 1 ScMi_Assassin 6 59 (Veronika)(_"Veronika")}
[gold]
side=1
amount=-40
[gold]
[modify_unit]
[filter]
id=Veronika
[/filter]
unrenamable=yes
[/modify_unit]
[message]
speaker=Veronika
message=_"Thank you for letting me join you."
[/message]
[/command]
[/option]
[/then]
[/if]
[/message]
[/event]
[/event]
[event]
name=start
[store_unit]
[filter]
side=1
x,y=recall,recall
[/filter]
kill=no
variable=to_be_recalled
[/store_unit]
[foreach]
array=to_be_recalled
[do]
[recall]
id=$this_item.id
[/recall]
[/do]
[/foreach]
{CLEAR_VARIABLE to_be_recalled}
[message]
speaker=Serena
message= _ "So many trees..."
[/message]
[message]
speaker=Zeth
message= _ "Thats why its called a forest."
[/message]
[message]
speaker=Yasmin
message= _ "And our goal is right behind all these trees. What a pain. Luckyly there is a road through the forest."
[/message]
[message]
speaker=Zeth
message= _ "Well the forest is so dense its ideal for an ambush... so keep an eye open girls... and robots."
[/message]
[message]
speaker=Robi
message= _ "I will protect my friend."
[/message]
[message]
speaker=Zeth
message= _ "Good to know that he only counts one friend here...*sigh*"
[/message]
[message]
speaker=Serena
message= _ "Robi we all are your friends."
[/message]
[message]
speaker=Robi
message= _ "REGISTERING ZETH AND YASMIN AS FRIENDS. REGISTERED."
[/message]
[message]
speaker=Serena
message= _ "Yay. So we just have to walk until the city?"
[/message]
[message]
speaker=Yasmin
message= _ "Exactly."
[/message]
[message]
speaker=Serena
message= _ "What is a city?"
[/message]
[message]
speaker=Zeth
message= _ "Well... You really were not much outside in the past eh.."
[/message]
[message]
speaker=Yasmin
message= _ "A city is when many people live together... and when they build many houses together then its called a city."
[/message]
[message]
speaker=Serena
message= _ "Ahh i see."
[/message]
[message]
speaker=Zeth
message= _ "Now that this is clear lets go."
[/message]
[/event]
[event]
name=victory
[message]
speaker=Serena
message= _ "This is a city *gazes at the city walls*"
[/message]
[message]
speaker=Zeth
message= _ "Ya but what next? The city i huge"
[/message]
[message]
speaker=Yasmin
message= _ "We head to the library as planned."
[/message]
[message]
speaker=Serena
message= _ "Lets go. To the library *smiles*"
[/message]
[/event]
[event]
name=last breath
[filter]
id=Serena
[/filter]
[message]
speaker=unit
message= _ "Whats this red liquid? It purs out of me... Im geting so weak...ill... just... lay... down... a bit......."
[/message]
[endlevel]
result=defeat
[/endlevel]
[/event]
[event]
name=last breath
[filter]
id=Robi
[/filter]
[message]
speaker=unit
message= _ "I have been dismantled... Malfunctioning... "
sound=ScMi_Explosion.wav
[/message]
[message]
speaker=Serena
message= _ "Nooooo!!! ROBIIII!!!"
sound=Cry.wav
[/message]
[/event]
[event]
name=last breath
[filter]
id=Yasmin
[/filter]
[message]
speaker=unit
message= _ "Thats it for me. And I...wanted...to...."
[/message]
[endlevel]
result=defeat
[/endlevel]
[/event]
[event]
name=last breath
[filter]
id=Zeth
[/filter]
[message]
speaker=unit
message= _ "Damn they got me..."
[/message]
[endlevel]
result=defeat
[/endlevel]
[/event]
[event]
name=moveto
[filter]
x=22
y=6
[/filter]
[endlevel]
result=victory
[/endlevel]
[/event]
[/scenario]
- Lord-Knightmare
- Discord Moderator
- Posts: 2364
- Joined: May 24th, 2010, 5:26 pm
- Location: Somewhere in the depths of Irdya, gathering my army to eventually destroy the known world.
- Contact:
Re: Just wanted to make something different but... crushed it
Rest of the code?TypeZero wrote: ↑July 27th, 2021, 4:58 pm I need some help here:
maybe someone can find my mistake as for me it just says that the scenario is unknown :/
Code: Select all
#textdomain wesnoth-Science_Miracle [scenario] id="05_TheForest" name= _ "The Forest" map_data="{~add-ons/Science_Miracle/maps/02_The_Forest.map}" {DEFAULT_SCHEDULE} {DEFAULT_MUSIC_PLAYLIST} turns=-1 victory_when_enemies_defeated=no next_scenario=null [story] [part] story=_ "To reach the city of Zar our heroes had to travel through a big Forest. This will be a tough march." background=backgrounds/ScMi_Forest.png [/part] [/story] [side] profile="data/add-ons/Science_Miracle/images/Faces/Serena.png" side=1 id=Serena type=ScMi_Serena name= _ "Serena" gender=female canrecruit=yes controller=human team_name=Serena gold=30 unrenamable=yes shroud=yes x=16 y=74 recruit= [/side] [side] side=2 id=Allys team_name=Serena controller=ai shroud=yes [/side] [side] side=3 id=Enemys team_name=Enemys controller=ai shroud=yes [/side] [event] name=prestart {PLACE_IMAGE items/ScMi_House.png 19 73} {PLACE_IMAGE items/ScMi_House.png 28 59} {PLACE_IMAGE items/ScMi_House.png 6 58} {PLACE_IMAGE items/ScMi_House2.png 25 39} {PLACE_IMAGE items/ScMi_House.png 11 22} {PLACE_IMAGE items/ScMi_House.png 32 14} {PLACE_IMAGE items/ScMi_House2.png 4 12} {PLACE_IMAGE items/ScMi_Gohere.png 22 6} [objectives] side=1 [objective] condition=win description= _ "Find the city entrance." [/objective] [objective] condition=lose description= _ "Death of Yasmin or Zeth or Serena." [/objective] [/objectives] [/event] [event] name=enter_hex [filter] y=60 [/filter] [event] name=enter_hex2 [filter] x=8 [/filter] {GENERIC_UNIT 3 ScMi_Snake 8 57} {GENERIC_UNIT 3 ScMi_Snake 8 58} {GENERIC_UNIT 3 ScMi_Snake 8 59} {NAMED_GENERIC_UNIT 2 ScMi_Scientist 6 58 (Scientist) (_"Scientist")} [message] speaker=Scientist message= _ "Hey you there. Could you help me with this Snakes?" [/message] [message] speaker=Serena message= _ "Sure why not. They are no match for us." [/message] [message] speaker=Scientist message= _ "Thank you." [/message] [/event] [/event] [event] name=killed_snakes [filter] [if] [have_unit] side=3 count=0 [/have_unit] [/if] [/filter] [message] speaker=Scientist message= _ "Thanks for the help. I need to talk to you. I wait inside the house." [/message] {STORE_UNIT Scientist} [store_gold] side=1 variable=side_gold [/store_gold] [event] name=enter_hex [filter] x=6 y=58 [/filter] {RESTORE_UNIT Scientist} [message] speaker=Scientist message= _ "Welcome. While we fought my daughters begun to admire you I wanted to give you some Gold. But as i entered the house they wanted to come with you. I can not let both of them go with you." [/message] [message] speaker=Scientist message= _ "I can give you 80 Gold or I can let my elder daughter Veronika go with you for 40 Gold. My younger daughter is too young to acompany you so i can't let her go with you." [option] label=_"I take the extra 80 Gold! [command] [message] speaker=Scientist message=_"Very well here you go 80 Gold!" [message] [gold] side=1 amount=80 [/gold] [/command] [/option] [if] [valiable] name=side_gold greater_than_equal_to=40 [/variable] [then] [option] label=_"I would wish that Veronika come with me!" [command] [message] speaker=Scientist message=_"Do you hear that Veronika. Get your stuff you can go with them." [/message] {NAMED_GENERIC_LOYAL_UNIT 1 ScMi_Assassin 6 59 (Veronika)(_"Veronika")} [gold] side=1 amount=-40 [gold] [modify_unit] [filter] id=Veronika [/filter] unrenamable=yes [/modify_unit] [message] speaker=Veronika message=_"Thank you for letting me join you." [/message] [/command] [/option] [/then] [/if] [/message] [/event] [/event] [event] name=start [store_unit] [filter] side=1 x,y=recall,recall [/filter] kill=no variable=to_be_recalled [/store_unit] [foreach] array=to_be_recalled [do] [recall] id=$this_item.id [/recall] [/do] [/foreach] {CLEAR_VARIABLE to_be_recalled} [message] speaker=Serena message= _ "So many trees..." [/message] [message] speaker=Zeth message= _ "Thats why its called a forest." [/message] [message] speaker=Yasmin message= _ "And our goal is right behind all these trees. What a pain. Luckyly there is a road through the forest." [/message] [message] speaker=Zeth message= _ "Well the forest is so dense its ideal for an ambush... so keep an eye open girls... and robots." [/message] [message] speaker=Robi message= _ "I will protect my friend." [/message] [message] speaker=Zeth message= _ "Good to know that he only counts one friend here...*sigh*" [/message] [message] speaker=Serena message= _ "Robi we all are your friends." [/message] [message] speaker=Robi message= _ "REGISTERING ZETH AND YASMIN AS FRIENDS. REGISTERED." [/message] [message] speaker=Serena message= _ "Yay. So we just have to walk until the city?" [/message] [message] speaker=Yasmin message= _ "Exactly." [/message] [message] speaker=Serena message= _ "What is a city?" [/message] [message] speaker=Zeth message= _ "Well... You really were not much outside in the past eh.." [/message] [message] speaker=Yasmin message= _ "A city is when many people live together... and when they build many houses together then its called a city." [/message] [message] speaker=Serena message= _ "Ahh i see." [/message] [message] speaker=Zeth message= _ "Now that this is clear lets go." [/message] [/event] [event] name=victory [message] speaker=Serena message= _ "This is a city *gazes at the city walls*" [/message] [message] speaker=Zeth message= _ "Ya but what next? The city i huge" [/message] [message] speaker=Yasmin message= _ "We head to the library as planned." [/message] [message] speaker=Serena message= _ "Lets go. To the library *smiles*" [/message] [/event] [event] name=last breath [filter] id=Serena [/filter] [message] speaker=unit message= _ "Whats this red liquid? It purs out of me... Im geting so weak...ill... just... lay... down... a bit......." [/message] [endlevel] result=defeat [/endlevel] [/event] [event] name=last breath [filter] id=Robi [/filter] [message] speaker=unit message= _ "I have been dismantled... Malfunctioning... " sound=ScMi_Explosion.wav [/message] [message] speaker=Serena message= _ "Nooooo!!! ROBIIII!!!" sound=Cry.wav [/message] [/event] [event] name=last breath [filter] id=Yasmin [/filter] [message] speaker=unit message= _ "Thats it for me. And I...wanted...to...." [/message] [endlevel] result=defeat [/endlevel] [/event] [event] name=last breath [filter] id=Zeth [/filter] [message] speaker=unit message= _ "Damn they got me..." [/message] [endlevel] result=defeat [/endlevel] [/event] [event] name=moveto [filter] x=22 y=6 [/filter] [endlevel] result=victory [/endlevel] [/event] [/scenario]
I am assuming you entered the ID wrongly in the 4th scenario file, but I cannot provide much support since this code is not enough for a detailed analysis.
Creator of "War of Legends"
Creator of the Isle of Mists survival scenario.
Maintainer of Forward They Cried
User:Knyghtmare | My Medium
Creator of the Isle of Mists survival scenario.
Maintainer of Forward They Cried
User:Knyghtmare | My Medium
Re: Just wanted to make something different but... crushed it
the other scenario works prefectly :
Code: Select all
#textdomain wesnoth-Science_Miracle
[scenario]
id="04_FirstAdventure"
name= _ "First Adventure"
map_data="{~add-ons/Science_Miracle/maps/01First_Adventure.map}"
{DEFAULT_SCHEDULE}
{DEFAULT_MUSIC_PLAYLIST}
turns=-1
victory_when_enemies_defeated=yes
next_scenario=05_TheForest
[story]
[part]
story=_ "The group started to travel together and soon they found a old and left factory."
background=backgrounds/Factory.png
[/part]
[/story]
[side]
profile="data/add-ons/Science_Miracle/images/Faces/Serena.png"
side=1
id=Serena
type=ScMi_Serena
name= _ "Serena"
gender=female
canrecruit=yes
controller=human
team_name=Serena
gold=30
unrenamable=yes
shroud=yes
x=2
y=22
recruit=
[/side]
[side]
type=ScMi_Bandit
id=Bandit
name= _ "Bandit"
side=2
controller=ai
gold=80
unrenamable=yes
shroud=yes
recruit=
x=41
y=3
[/side]
[side]
type=ScMi_Piper
id=Piper
name= _ "Piper"
side=3
controller=ai
gold=80
unrenamable=yes
shroud=yes
recruit=
x=48
y=35
[/side]
[event]
name=prestart
{PLACE_IMAGE items/Factory.png 8 21}
{PLACE_IMAGE items/Factory.png 48 35}
{PLACE_IMAGE items/Factory.png 41 3}
{PLACE_IMAGE items/Road.png 8 20}
{PLACE_IMAGE items/Road.png 7 21}
{PLACE_IMAGE items/Road.png 7 22}
{PLACE_IMAGE items/Road.png 8 22}
{PLACE_IMAGE items/Road.png 47 36}
{PLACE_IMAGE items/Road.png 48 36}
{PLACE_IMAGE items/Road.png 49 36}
{PLACE_IMAGE items/Road.png 49 35}
{PLACE_IMAGE items/Road.png 40 2}
{PLACE_IMAGE items/Road.png 41 2}
{PLACE_IMAGE items/Road.png 42 2}
{PLACE_IMAGE items/Road.png 42 3}
{GENERIC_UNIT 2 ScMi_Brawler 40 2}
{GENERIC_UNIT 2 ScMi_Brawler 41 2}
{GENERIC_UNIT 2 ScMi_Brawler 42 2}
{GENERIC_UNIT 2 ScMi_Brawler 42 3}
{GENERIC_UNIT 3 ScMi_Skargling 47 36}
{GENERIC_UNIT 3 ScMi_Skargling 48 36}
{GENERIC_UNIT 3 ScMi_Skargling 49 36}
{GENERIC_UNIT 3 ScMi_Skargking 49 35}
[objectives]
side=1
[objective]
condition=win
description= _ "Defend yourself."
[/objective]
[objective]
condition=lose
description= _ "Death of Yasmin or Zeth or Serena"
[/objective]
[/objectives]
[/event]
[event]
name=start
[unit]
profile="data/add-ons/Science_Miracle/images/Faces/Yasmin.png"
type=ScMi_Yasmin
canrecruit=yes
id=Yasmin
name= _ "Yasmin"
side=1
x=1
y=22
experience=2
[modifications]
{TRAIT_LOYAL}
{TRAIT_STRONG}
[/modifications]
unrenamable=yes
[/unit]
[unit]
profile="data/add-ons/Science_Miracle/images/Faces/Zeth.png"
type=ScMi_Zeth
canrecruit=yes
id=Zeth
name= _ "Zeth"
side=1
x=1
y=23
experience=2
[modifications]
{TRAIT_LOYAL}
{TRAIT_STRONG}
[/modifications]
unrenamable=yes
[/unit]
[message]
speaker=Serena
message = _ "Look there is a biiiiig building."
[/message]
[message]
speaker=Yasmin
message = _ "Its an factory i wonder why i cant see no one there..."
[/message]
[message]
speaker=Bandit
message = _ "Whos there? You havr to pay tribute to go through this place. We will protect you... you never know what could happen to you and your pretty companions."
[/message]
[message]
speaker=Piper
message = _ "Nah. Dont pay that idiot pay me!"
[/message]
[message]
speaker=Bandit
message = _ "Shut up idiot ill kill you when im done with this business here."
[/message]
[message]
speaker=Zeth
message = _ "Yas... that idiots thinks you girls cant handle this and i that i have to protect you."
[/message]
[message]
speaker=Yasmin
message = _ "Huh... To be honest you guys should be more afraid of the pretty ones than of this guy here."
[/message]
[message]
speaker=Zeth
message = _ "Hey dont let me look as if im nothing to worry about..!"
[/message]
[message]
speaker=Yasmin
message = _ "But you are nothing to worry about!"
[/message]
[message]
speaker=Serena
message = _ "Whats tribute?"
[/message]
[message]
speaker=Zeth
message = _ "Oh Jeeez!..."
[/message]
[message]
speaker=Yasmin
message = _ "Well tribute is something you give someone else to show your apreciation...or something like that..."
[/message]
[message]
speaker=Serena
message = _ "And why dont we give it to him?"
[/message]
[message]
speaker=Zeth
message = _ "Because we dont apreciate him!"
[/message]
[message]
speaker=Bandit
message = _ "Arent you forgetting someone?"
[/message]
[message]
speaker=Bandit
message = _ "No payment?"
[/message]
[message]
speaker=Yasmin
message = _ "Who cares?"
[/message]
[message]
speaker=Bandit
message = _ "You are kidding me... Guys ther will be a spanking today... ATTACK!!!"
[/message]
[message]
speaker=Piper
message = _ "Skargs ATTACK!!!"
[/message]
[/event]
[event]
name=victory
[message]
speaker=Serena
message= _ "We won and are alive somehow..."
[/message]
[message]
speaker=Zeth
message= _ "Ya but what next? We still dont know what to do with Serena. Im afraid she isnt still able to control her powers. This time it did go smooth but i doubt it will be like this forever."
[/message]
[message]
speaker=Yasmin
message= _ "Zeth is right Serena. We should try to help you first. Do you have any clues?"
[/message]
[message]
speaker=Serena
message= _ "No my dad he had many books but i dont know anything about this."
[/message]
[message]
speaker=Yasmin
message= _ "The city of Zar have a big library maybe we can get some clues there. And Serena if you feel something unusuall about your powers just stay behind and hide."
[/message]
[message]
speaker=Zeth
message= _ "Ya in that big city its better if you dont show off your powers..."
[/message]
[message]
speaker=Serena
message= _ "Okay ill do my best."
[/message]
[/event]
[event]
name=last breath
[filter]
id=Serena
[/filter]
[message]
speaker=unit
message= _ "Whats this red liquid? It purs out of me... Im geting so weak...ill... just... lay... down... a bit......."
[/message]
[endlevel]
result=defeat
[/endlevel]
[/event]
[event]
name=last breath
[filter]
id=Yasmin
[/filter]
[message]
speaker=unit
message= _ "Thats it for me. And I...wanted...to...."
[/message]
[endlevel]
result=defeat
[/endlevel]
[/event]
[event]
name=last breath
[filter]
id=Zeth
[/filter]
[message]
speaker=unit
message= _ "Damn they got me..."
[/message]
[endlevel]
result=defeat
[/endlevel]
[/event]
[event]
name=last breath
[filter]
id=Robi
[/filter]
[message]
speaker=unit
message= _ "I have been dismantled... Malfunctioning... "
sound=ScMi_Explosion.wav
[/message]
[message]
speaker=Serena
message= _ "Nooooo!!! ROBIIII!!!"
sound=Cry.wav
[/message]
[/event]
[event]
name=moveto
[filter]
x=8
y=21
[/filter]
[message]
speaker=Serena
message = _ "This is a biiiig house..."
[/message]
[message]
speaker=Yasmin
message = _ "This used to be an factory. I wonder what they used to craft here..."
[/message]
[message]
speaker=Zeth
message = _ "I dont know for sure but i would bet on robots... "
[/message]
[message]
speaker=Serena
message = _ "What are robots?"
[/message]
[message]
speaker=Yasmin
message = _ "Well robots are artificial life forms... crafted by someone."
[/message]
[message]
speaker=Serena
message = _ "Artificial ...?"
[/message]
[message]
speaker=Zeth
message = _ "Forget about that Serena. They are things that have been created."
[/message]
[message]
speaker=Serena
message = _ "Created things...*mumbles*"
[/message]
{NAMED_GENERIC_LOYAL_UNIT 1 ScMi_Scout_Robot 8 22 (Robot) (_"Robot")}
[modify_unit]
[filter]
x,y=8,22
[/filter]
profile="data/add-ons/Science_Miracle/images/Faces/ScMi_Robi.png"
[/modify_unit]
[message]
speaker=Robot
message = _ "Identified non usual units. Please state your business."
[/message]
[message]
speaker=Serena
message = _ "Look this one can speak. Hello mister Robot, im Serena. And who are you?"
[/message]
[message]
speaker=Robot
message = _ "Me im robot number 001978234/xrl-325"
[/message]
[message]
speaker=Serena
message = _ "Is this your name? rather diffcult 0019...*mumbles*"
[/message]
[message]
speaker=Yasmin
message = _ "Its his identification number not his name."
[/message]
[message]
speaker=Serena
message = _ "So whats his name?"
[/message]
[message]
speaker=Robot
message = _ "My name? Cant comply...ERROR NOT FOUND."
[/message]
[message]
speaker=Serena
message = _ "You dont have a name? You want one i can give you one *smiles*"
[/message]
[message]
speaker=Robot
message = _ "Why do i need a name? LOGIC NOT FOUND...ERROR"
[/message]
[message]
speaker=Serena
message = _ "Well a name is so friends can call you so you know when they are speaking to you"
[/message]
[message]
speaker=Robot
message = _ "Friends...? ERROR FILES NOT FOUND. Friends not found."
[/message]
[message]
speaker=Serena
message = _ "You dont have friends? Thats sad *looks down thinking*... *looks up* I can be your friend *smiles*"
[/message]
[message]
speaker=Zeth
message = _ "You want to be friends with a robot... this is something i never heared usually no one would say that."
[/message]
[message]
speaker=Serena
message = _ "Why not? A robot can also have friends. How about it mister Robot lets be friends. Why dont i call you Robi?"
[/message]
[modify_unit]
[filter]
x,y=8,22
[/filter]
id=Robi
name=_ "Robi"
unrenamable=yes
[/modify_unit]
[message]
speaker=Robi
message = _ "Friends... MASTER SERENA REGISTERED. NEW IDENTIFICATION ROBI AKNOWLEDGED."
[/message]
[message]
speaker=Serena
message = _ "Not Master. Friend *smiles*"
[/message]
[message]
speaker=Robi
message = _ "NEW DIRECTORY FRIENDS. NEW ENTRY SERENA. Thank you friend."
[/message]
[message]
speaker=Serena
message = _ "Nice to meet you Robi."
[/message]
[objectives]
side=1
[objective]
condition=win
description= _ "Defeat the bandits"
[/objective]
[objective]
condition=lose
description= _ "Death of the one of the Protagonists"
[/objective]
[/objectives]
[/event]
[/scenario]
- Lord-Knightmare
- Discord Moderator
- Posts: 2364
- Joined: May 24th, 2010, 5:26 pm
- Location: Somewhere in the depths of Irdya, gathering my army to eventually destroy the known world.
- Contact:
Re: Just wanted to make something different but... crushed it
Code: Select all
[gold]
side=1
amount=-40
[gold]
[/gold]
Creator of "War of Legends"
Creator of the Isle of Mists survival scenario.
Maintainer of Forward They Cried
User:Knyghtmare | My Medium
Creator of the Isle of Mists survival scenario.
Maintainer of Forward They Cried
User:Knyghtmare | My Medium
Re: Just wanted to make something different but... crushed it
nicely found two bugs i didnt see... well i use Notepad++ to do the coding so this happens when the code gets longer
but it still says:
but it still says:
Code: Select all
20210727 19:10:59 error config: Found invalid closing tag [/command] for tag [message]
opened at ~add-ons/Science_Miracle/scenarios/05TheForest.cfg:150
included from ~add-ons/Science_Miracle/_main.cfg:43
closed at ~add-ons/Science_Miracle/scenarios/05TheForest.cfg:155
included from ~add-ons/Science_Miracle/_main.cfg:43
- Lord-Knightmare
- Discord Moderator
- Posts: 2364
- Joined: May 24th, 2010, 5:26 pm
- Location: Somewhere in the depths of Irdya, gathering my army to eventually destroy the known world.
- Contact:
Re: Just wanted to make something different but... crushed it
Code: Select all
[message]
speaker=Scientist
message=_"Very well here you go 80 Gold!"
[message]
Creator of "War of Legends"
Creator of the Isle of Mists survival scenario.
Maintainer of Forward They Cried
User:Knyghtmare | My Medium
Creator of the Isle of Mists survival scenario.
Maintainer of Forward They Cried
User:Knyghtmare | My Medium
Re: Just wanted to make something different but... crushed it
that one i also found.
the first event works but the nested one dont
Code: Select all
[event]
name=die
first_time_only=no
[filter]
side=3
type=ScMi_Snake
[/filter]
[if]
[have_unit]
side=3
type=ScMi_Snake
count=0
[/have_unit]
[then]
[message]
speaker=Scientist
message= _ "Thanks for the help. I need to talk to you. I wait inside the house."
[/message]
{STORE_UNIT Scientist}
[store_gold]
side=1
variable=side_gold
[/store_gold]
[/then]
[/if]
[event]
name=moveto
[filter]
x=6
y=58
[/filter]
{RESTORE_UNIT Scientist}
[message]
speaker=Scientist
message= _ "Welcome. While we fought my daughters begun to admire you I wanted to give you some Gold. But as i entered the house they wanted to come with you. I can not let both of them go with you."
[/message]
[message]
speaker=Scientist
message= _ "I can give you 80 Gold or I can let my elder daughter Veronika go with you for 40 Gold. My younger daughter is too young to acompany you so i can't let her go with you."
[option]
label=_"I take the extra 80 Gold!"
[command]
[message]
speaker=Scientist
message=_"Very well here you go 80 Gold!"
[/message]
[gold]
side=1
amount=80
[/gold]
[/command]
[/option]
[if]
[variable]
name=side_gold
greater_than_equal_to=40
[/variable]
[then]
[option]
label=_"I would wish that Veronika come with me!"
[command]
[message]
speaker=Scientist
message=_"Do you hear that Veronika. Get your stuff you can go with them."
[/message]
{NAMED_GENERIC_LOYAL_UNIT 1 ScMi_Assassin 6 59 (Veronika)(_"Veronika")}
[gold]
side=1
amount=-40
[/gold]
[modify_unit]
[filter]
id=Veronika
[/filter]
unrenamable=yes
[/modify_unit]
[message]
speaker=Veronika
message=_"Thank you for letting me join you."
[/message]
[/command]
[/option]
[/then]
[/if]
[/message]
[/event]
[/event]
Re: Just wanted to make something different but... crushed it
Yesterday night i reorganized the code and now both of the events work...
if i keep the one nested, then it fires up to 3 times... maybe it has something to do with the first_time_only variable.
if i dont nest it then it fires before all enemies are down. i have tried to put some variable to check that but im sure im using it wrong.
here is what i tried
if i keep the one nested, then it fires up to 3 times... maybe it has something to do with the first_time_only variable.
if i dont nest it then it fires before all enemies are down. i have tried to put some variable to check that but im sure im using it wrong.
here is what i tried
Code: Select all
[event]
name=die
first_time_only=no
[filter]
side=3
type=ScMi_Snake
[/filter]
[if]
[have_unit]
side=3
type=ScMi_Snake
count=0
[/have_unit]
[then]
[message]
speaker=Scientist
message= _ "Thanks for the help. I need to talk to you. I wait inside the house."
[/message]
[set_variable]
name=die_done
value=1
[/set_variable]
[if]
[have_unit]
id=Scientist
[/have_unit]
[then]
[store_unit]
[filter]
id=Scientist
[/filter]
kill=yes
variable=store_Scientist
[/store_unit]
[/then]
[/if]
[/then]
[/if]
[/event]
[event]
name=moveto
first_time_only=yes
[filter]
side=1
x=6
y=58
[variable]
name=die_done
equals=1
[/variable]
[/filter]
[if]
[variable]
name=store_Scientist.id
equals="Scientist"
[/variable]
[then]
[unstore_unit]
variable=store_Scientist
x,y=5,58
[/unstore_unit]
{CLEAR_VARIABLE store_Scientist}
[/then]
[/if]
[message]
speaker=Scientist
message= _ "Welcome. While we fought my daughters begun to admire you I wanted to give you some Gold. But as i entered the house they wanted to come with you. I could need their help so here is my proposal."
[/message]
[store_gold]
side=1
variable=side_gold
[/store_gold]
[if]
[variable]
name=side_gold
greater_than_equal_to=40
[/variable]
[then]
[message]
speaker=Scientist
message= _ "I can give you 80 Gold or I can let my elder daughter Veronika go with you for 40 Gold. My younger daughter is too young to acompany you so i can't let her go with you."
[option]
label=_"I take the extra 80 Gold!"
[command]
[message]
speaker=Scientist
message=_"Very well here you go 80 Gold!"
[/message]
[gold]
side=1
amount=80
[/gold]
[/command]
[/option]
[option]
label=_"I would wish that Veronika come with me!"
[command]
[message]
speaker=Scientist
message=_"Do you hear that Veronika. Get your stuff you can go with them."
[/message]
{NAMED_GENERIC_LOYAL_UNIT 1 ScMi_Assassin 6 59 (Veronika)(_"Veronika")}
[gold]
side=1
amount=-40
[/gold]
[modify_unit]
[filter]
id=Veronika
[/filter]
unrenamable=yes
[/modify_unit]
[message]
speaker=Veronika
message=_"Thank you for letting me join you."
[/message]
[/command]
[/option]
[/message]
[/then]
[else]
[message]
speaker=Scientist
message= _ "I can give you 80 Gold or I can let my elder daughter Veronika go with you for 40 Gold. My younger daughter is too young to acompany you so i can't let her go with you."
[option]
label=_"I take the extra 80 Gold!"
[command]
[message]
speaker=Scientist
message=_"Very well here you go 80 Gold!"
[/message]
[gold]
side=1
amount=80
[/gold]
[/command]
[/option]
[/message]
[/else]
[/if]
[/event]
Re: Just wanted to make something different but... crushed it
i found a solution for that problem. Thanks to everyone for the help. Your hints were marvelous =).
I just have to encapsulate the nested event inside the then tags and give him an id so i can remove the event once its fired .
I just have to encapsulate the nested event inside the then tags and give him an id so i can remove the event once its fired .
Re: Just wanted to make something different but... crushed it
Code: Select all
[event]
name=die
first_time_only=no
[filter]
side=3
type=ScMi_Snake
[/filter]
[filter_condition]
[have_unit]
side=3
type=ScMi_Snake
count=0
[/have_unit]
[/filter_condition]
[message]
speaker=Scientist
message= _ "Thanks for the help. I need to talk to you. I wait inside the house."
[/message]
[if]
[have_unit]
id=Scientist
[/have_unit]
[then]
[store_unit]
[filter]
id=Scientist
[/filter]
kill=yes
variable=store_Scientist
[/store_unit]
[/then]
[/if]
[event]
name=moveto
[filter]
side=1
x,y=6,58
[/filter]
[if]
[variable]
name=store_Scientist.id
equals="Scientist"
[/variable]
[then]
[unstore_unit]
variable=store_Scientist
x,y=5,58
[/unstore_unit]
{CLEAR_VARIABLE store_Scientist}
[/then]
[/if]
[message]
speaker=Scientist
message= _ "Welcome. While we fought my daughters begun to admire you I wanted to give you some Gold. But as i entered the house they wanted to come with you. I could need their help so here is my proposal."
[/message]
[store_gold]
side=1
variable=side_gold
[/store_gold]
[if]
[variable]
name=side_gold
greater_than_equal_to=40
[/variable]
[then]
[message]
speaker=Scientist
message= _ "I can give you 80 Gold or I can let my elder daughter Veronika go with you for 40 Gold. My younger daughter is too young to acompany you so i can't let her go with you."
[option]
label=_"I take the extra 80 Gold!"
[command]
[message]
speaker=Scientist
message=_"Very well here you go 80 Gold!"
[/message]
[gold]
side=1
amount=80
[/gold]
[/command]
[/option]
[option]
label=_"I would wish that Veronika come with me!"
[command]
[message]
speaker=Scientist
message=_"Do you hear that Veronika. Get your stuff you can go with them."
[/message]
{NAMED_GENERIC_LOYAL_UNIT 1 ScMi_Assassin 6 59 (Veronika)(_"Veronika")}
[gold]
side=1
amount=-40
[/gold]
[modify_unit]
[filter]
id=Veronika
[/filter]
unrenamable=yes
[/modify_unit]
[message]
speaker=Veronika
message=_"Thank you for letting me join you."
[/message]
[/command]
[/option]
[/message]
[/then]
[else]
[message]
speaker=Scientist
message= _ "I can give you 80 Gold or I can let my elder daughter Veronika go with you for 40 Gold. My younger daughter is too young to acompany you so i can't let her go with you."
[option]
label=_"I take the extra 80 Gold!"
[command]
[message]
speaker=Scientist
message=_"Very well here you go 80 Gold!"
[/message]
[gold]
side=1
amount=80
[/gold]
[/command]
[/option]
[/message]
[/else]
[/if]
[/event]
[/event]