need a coder!
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.
need a coder!
Can one of you coders code the things needed for the RPG campaign, see RPG campaign in Scenario and Campaign Development. Thanks!
Sorry for the meaningless post
[edit]
this forum seems to be more c++ related,
so pherhaps off topic
[/edit]
this forum seems to be more c++ related,
so pherhaps off topic
[/edit]
Code: Select all
#define CHOOSE_CHARACTER X Y
[message]
speaker=narrator
message= _ "Please choose the character you want to play"
[/message]
[message]
speaker=narrator
message= _ "Classes Availible:"
{UNIT_OPTION (Elvish Fighter) 1}
{UNIT_OPTION (Elvish Archer) 0}
{UNIT_OPTION (Elvish Shaman) 2}
[/message]
[if]
[variable]
name=has_gender
numerical_equals=0
[/variable]
[then]
[message]
speaker=narrator
message= _ "Please choose the characters gender"
[/message]
[message]
speaker=narrator
message= _ "Hmm...I have to consider this..."
[option]
message= _ "male"
[command]
{VARIABLE hero.gender male}
[/command]
[/option]
[option]
message= _ "female"
[command]
{VARIABLE hero.gender female}
[/command]
[/option]
[/message]
[/then]
[else]
[if]
[variable]
name=has_gender
numerical_equals=1
[/variable]
[then]
{VARIABLE hero.gender male}
[/then]
[else]
{VARIABLE hero.gender female}
[/else]
[/if]
[/else]
[/if]
{CLEAR_VARIABLE has_gender}
[message]
speaker=narrator
message= _ "You Character is $hero.gender|."
[/message]
[unit]
x={X}
y={Y}
side=1
type=$hero.type
gender=$hero.gender
role=Party
canrecruit=1
description="Please change"
traits_description="special case"
[modifications]
[trait]
id=intelligent
[effect]
apply_to=max_experience
increase=-20%
[/effect]
[effect]
apply_to=movement
increase=0
[/effect]
[effect]
apply_to=hitpoints
increase_total=25%
heal_full=yes
[/effect]
[effect]
apply_to=loyal
[/effect]
[effect]
apply_to=attack
range=short
increase_damage=0
[/effect]
[/trait]
[/modifications]
[/unit]
[message]
role=player
message= _ "I have no name at the moment.
This is because the game can't ask you to insert a string.
You have to rename me manually for now.
How can a random elvish name be applied or can i ask for a string ?
Does anybody know why this text has two colours and how to format it ?"
[/message]
#enddef
#define UNIT_OPTION UNIT HAS_GENDER
[option]
message= _ "{UNIT}"
[command]
[message]
speaker=narrator
message= _ "You have choosen the {UNIT}."
[/message]
{VARIABLE hero.type ({UNIT})}
{VARIABLE has_gender {HAS_GENDER}}
[/command]
[/option]
#enddef
#define GET_PLAYER TYPE X Y HAS_GENDER
[unit]
x={X}
y={Y}
side=1
type={TYPE}
role=Player
canrecruit=1
description=Change my Name
[/unit]
#enddef
#define GET_MEMBER TYPE X Y
[unit]
x={X}
y={Y}
side=1
type={TYPE}
role=Party
description=Gelgar
# canrecruit=0
[modifications]
[trait]
id=intelligent
[effect]
apply_to=max_experience
increase=-20%
[/effect]
[effect]
apply_to=movement
increase=0
[/effect]
[effect]
apply_to=hitpoints
increase_total=25%
heal_full=yes
[/effect]
[effect]
apply_to=loyal
[/effect]
[effect]
apply_to=attack
range=short
increase_damage=0
[/effect]
[/trait]
[/modifications]
[/unit]
#enddef
#define GET_UNIT TYPE X Y SIDE ROLE NAME
[unit]
x={X}
y={Y}
side={SIDE}
type={TYPE}
role={ROLE}
canrecruit=1
description={NAME}
[/unit]
#enddef