RPG-MP-Scenerio "Wrath of the Son"
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.
- Luroch_Delkar
- Posts: 44
- Joined: August 11th, 2010, 11:15 pm
- Location: Some people are in homes, some are in cars, I am in-sane.
RPG-MP-Scenerio "Wrath of the Son"
I am moving my previous topic about WML bloating to here where I will post all of the future questions I have while making this scenario. I will start it off with this question.
I am having difficulties with making my own unit. The goal is not to make a completely new unit, but rather modify an old unit to have new movement values, Aka it has 1 movement and all terrain cost's more than 1 movement.
In my _main.cfg I have the code
Jailbreak is the folder my _main.cfg is in.
In my units.cfg I attempted to specify a new movement type with
That is all of the code within this file. I have tried it without the #textdomain wesnoth.
I originally had made a unit file IronGuard.cfg from scratch, but since that didn't work I have since attempted to copy the entire Heavy Infantryman.cfg from the core files and then change the file name to IronGuard.cfg as well as change:
to
Whenever I run the game and attempt to place the unit Iron Guard
it keeps saying "Unknown Unit" then proceeds to crash the game.
Any help will be appreciated.
I am having difficulties with making my own unit. The goal is not to make a completely new unit, but rather modify an old unit to have new movement values, Aka it has 1 movement and all terrain cost's more than 1 movement.
In my _main.cfg I have the code
Code: Select all
{~add-ons/Jailbreak/units/units.cfg}
In my units.cfg I attempted to specify a new movement type with
Code: Select all
#textdomain wesnoth
[+units]
{~add-ons/Jailbreak/units/IronGuard.cfg}
[movetype]
name=stoneguard
[movement_costs]
shallow_water=9
reef=9
swamp_water=9
flat=9
sand=9
forest=9
hills=9
village=9
castle=9
cave=9
frozen=9
fungus=9
[/movement_costs]
[defense]
shallow_water=90
reef=80
swamp_water=90
flat=70
sand=80
forest=60
hills=60
village=60
castle=50
cave=60
frozen=80
fungus=60
[/defense]
[resistance]
blade=110
pierce=110
impact=110
fire=110
cold=110
arcane=110
[/resistance]
[/movetype]
[/units]
I originally had made a unit file IronGuard.cfg from scratch, but since that didn't work I have since attempted to copy the entire Heavy Infantryman.cfg from the core files and then change the file name to IronGuard.cfg as well as change:
Code: Select all
id=Heavy Infantryman
name="Heavy Infantryman"
Code: Select all
id=Iron Guard
name="Iron Guard"
Spoiler:
Any help will be appreciated.
"The Enforcer knows only one way to preserve peace. So mind your neighbors else it will descend upon you." Sword of the Stars Forever
HAPPINESS=Moderation, Variety, and Love
Current Projects: Jailbreak (RPG)(3/4 completed) , Dungeonmaster Era
HAPPINESS=Moderation, Variety, and Love
Current Projects: Jailbreak (RPG)(3/4 completed) , Dungeonmaster Era
Re: RPG-MP-Scenerio "Wrath of the Son"
There's a much easier way of doing a unit based on a mainline one. Make a .cfg in your units folder and call it IronGuard. Then put in the .cfg:
Code: Select all
[unit_type]
id=Iron Guard
name= _ "Iron Guard"
[base_unit]
id=Heavy Infantryman
[/base_unit]
[movement_costs]
shallow_water=9
reef=9
swamp_water=9
flat=9
sand=9
forest=9
hills=9
village=9
castle=9
cave=9
frozen=9
fungus=9
[/movement_costs]
[defense]
shallow_water=90
reef=80
swamp_water=90
flat=70
sand=80
forest=60
hills=60
village=60
castle=50
cave=60
frozen=80
fungus=60
[/defense]
[resistance]
blade=110
pierce=110
impact=110
fire=110
cold=110
arcane=110
[/resistance]
[/movetype]
[/unit_type]
Code: Select all
#ifdef MULTIPLAYER
...
[+units]
{~add-ons/Jailbreak/units/}
[/units]
#endif
"What do you mean, "a dwarvish dragonguard with marksman is overpowered"?"
Story of a Drake Outcast | The Nonsense Era
Played HttT-Underground Channels? Thought it was rubbish? Help us develop it here!
Story of a Drake Outcast | The Nonsense Era
Played HttT-Underground Channels? Thought it was rubbish? Help us develop it here!
- Luroch_Delkar
- Posts: 44
- Joined: August 11th, 2010, 11:15 pm
- Location: Some people are in homes, some are in cars, I am in-sane.
Re: RPG-MP-Scenerio "Wrath of the Son"
Thanks, that's just what I was looking for. Better actually. Nice quote by the way.
"The Enforcer knows only one way to preserve peace. So mind your neighbors else it will descend upon you." Sword of the Stars Forever
HAPPINESS=Moderation, Variety, and Love
Current Projects: Jailbreak (RPG)(3/4 completed) , Dungeonmaster Era
HAPPINESS=Moderation, Variety, and Love
Current Projects: Jailbreak (RPG)(3/4 completed) , Dungeonmaster Era
- Luroch_Delkar
- Posts: 44
- Joined: August 11th, 2010, 11:15 pm
- Location: Some people are in homes, some are in cars, I am in-sane.
Re: RPG-MP-Scenerio "Wrath of the Son"
Hmm, I am still having problems.
In my _main.cfg I have the code:
in add-ons/Jailbreak/units I have the file IronGuard.cfg which contains the code:
Later in my _main.cfg I evoke the unit with:
I still get an unknown unit error.
In my _main.cfg I have the code:
Code: Select all
[multiplayer]
# Game Data
id=Jailbreak
name= _ "Jailbreak"
map_data="{~add-ons/Jailbreak/map/Jailbreak_Map}"
turns=-1 players=4 experience_modifier=80 description= _ "Use Bob's RPG Era."
# Macro Data
{~add-ons/Bobs_RPG_Era/files/misc_macros.cfg}
{~add-ons/Bobs_RPG_Era/files/scenario_macros.cfg}
{~add-ons/Bobs_RPG_Era/files/shops.cfg}
{~add-ons/Jailbreak/macros/misc.cfg}
{~add-ons/Jailbreak/macros/abilities.cfg}
{~add-ons/Jailbreak/macros/item_placing.cfg}
{~add-ons/Jailbreak/macros/potion_drinking.cfg}
[+units]
{~add-ons/Jailbreak/units}
[/units]
Code: Select all
[unit_type]
id=Iron Guard
name= _ "Iron Guard"
[base_unit]
id="Heavy Infantryman"
[/base_unit]
[movement_costs]
shallow_water=9
reef=9
swamp_water=9
flat=9
sand=9
forest=9
hills=9
village=9
castle=9
cave=9
frozen=9
fungus=9
[/movement_costs]
[defense]
shallow_water=90
reef=80
swamp_water=90
flat=70
sand=80
forest=60
hills=60
village=60
castle=50
cave=60
frozen=80
fungus=60
[/defense]
[resistance]
blade=110
pierce=110
impact=110
fire=110
cold=110
arcane=110
[/resistance]
hitpoints=1
movement=1
experience=9999
level=1
alignment=neutral
advances_to=null
num_traits=1
description="Those elite guards that are placed to guard an area from intruders."
do_not_list=yes
[/unit_type]
Code: Select all
[unit]
x=20
y=58
side=3
type="Iron Guard"
id="guard2"
name= _ "Guard Lieutenant First Class"
role=heavy_infantryman
hitpoints=50
facing=sw
ai_special=guardian
[modifications]
{TRAIT_LOYAL}
[/modifications]
[/unit]
"The Enforcer knows only one way to preserve peace. So mind your neighbors else it will descend upon you." Sword of the Stars Forever
HAPPINESS=Moderation, Variety, and Love
Current Projects: Jailbreak (RPG)(3/4 completed) , Dungeonmaster Era
HAPPINESS=Moderation, Variety, and Love
Current Projects: Jailbreak (RPG)(3/4 completed) , Dungeonmaster Era
Re: RPG-MP-Scenerio "Wrath of the Son"
The ifdef is probably the needed bit.I wrote:Then, put in your _main.cfg:That should do the trick.Code: Select all
#ifdef MULTIPLAYER ... [+units] {~add-ons/Jailbreak/units/} [/units] #endif
"What do you mean, "a dwarvish dragonguard with marksman is overpowered"?"
Story of a Drake Outcast | The Nonsense Era
Played HttT-Underground Channels? Thought it was rubbish? Help us develop it here!
Story of a Drake Outcast | The Nonsense Era
Played HttT-Underground Channels? Thought it was rubbish? Help us develop it here!
- Luroch_Delkar
- Posts: 44
- Joined: August 11th, 2010, 11:15 pm
- Location: Some people are in homes, some are in cars, I am in-sane.
Re: RPG-MP-Scenerio "Wrath of the Son"
Yep, that worked. Thanks again.
"The Enforcer knows only one way to preserve peace. So mind your neighbors else it will descend upon you." Sword of the Stars Forever
HAPPINESS=Moderation, Variety, and Love
Current Projects: Jailbreak (RPG)(3/4 completed) , Dungeonmaster Era
HAPPINESS=Moderation, Variety, and Love
Current Projects: Jailbreak (RPG)(3/4 completed) , Dungeonmaster Era