Hunted outlaws

Discussion and development of scenarios and campaigns for the game.

Moderators: Forum Moderators, Developers

User avatar
Lordlewis
Posts: 286
Joined: July 20th, 2016, 11:15 am
Location: All around, every where. All in one place yet I'm there.-Lordlewis

Hunted outlaws

Post by Lordlewis » May 4th, 2018, 9:48 pm

Hello, this is my first add-in that I've made. This here is a campaign which uses the Reign of the Lords era, instead of only really your units advancing into a special level 4 or 5, now your enemy already has. Lead a band of outlaws to the domain of a loyalist city. This campaign currently has 15 scenarios and many many bugs that I don't know how to remove, I'll learn how to remove them soon (hopefully). Feel free to give your feed back to me and to possibly help me because I'm new to WML.
Note: so far there is no story really added into it, but all but one scenario has been completed.
Last edited by Ravana on May 5th, 2018, 8:58 pm, edited 1 time in total.
Reason: Large size was unneeded here
Gold is great!
Swat them bugs!

User avatar
tamanegi
Posts: 130
Joined: August 25th, 2014, 11:38 am
Location: Japan

Re: Hunted outlaws

Post by tamanegi » May 5th, 2018, 7:34 am

I played the first scenario and met some errors/warnings.

1: {TURN_RUNS_OUT} should be placed inside [objective]. This causes warning message "error scripting/lua: lua/core.lua:420: [objective] not supported at scenario toplevel.". Or you can simply remove TURN_RUNS_OUT macro because that macro just adds an item in objective (equivalent to your "Run out of turns" objective item).

2: In the end of first scenario, I met "error scripting/lua: game_error: unknown unit type: ROLSupreme Commander". May have some problems in loading unit types. I know you added {~add-ons/Reign_of_the_Lords/units} in _main.cfg and the unit type id is correct. But I'm not sure whether it recursively searches the subdirectories.

3: in the beginning of the second scenario, [gold_carryover] is misplaced outside [objectives].

4: typo in unit attribute in scenario 2. "unrenameable" should be "unrenamable" (remove 'e').

As for dependency check, additional texts in campaign selection menu are really nice! But you might want to add dependency requirement in _server.pbl. Please take a look at the dependencies= attribute in PblWML. And please indenting the cfg files if possible. It's bit hard to read... :cry:

(edit)
I finished the first scenario at 17th turn.
Discord: @tamanegi
It is true that we cannot be free from bugs, but at least let our bugs not always the same...
A Group in a War: my first campaign, An Independence War: and the sequel

User avatar
Lordlewis
Posts: 286
Joined: July 20th, 2016, 11:15 am
Location: All around, every where. All in one place yet I'm there.-Lordlewis

Re: Hunted outlaws

Post by Lordlewis » May 5th, 2018, 11:09 am

Thank you for telling me this tamanegi, the main reason why I uploaded this was so I can fix bugs (which I may or may not know how to fix) and make scenarios better at the same time. I'll try to make the files a little cleaner. I'm not sure why the supreme commander unit doesn't work, at least for me he spawns.
Edit: I didn't add a turn_run_out macros, so I can't imagine why it's happening...
Gold is great!
Swat them bugs!

User avatar
tamanegi
Posts: 130
Joined: August 25th, 2014, 11:38 am
Location: Japan

Re: Hunted outlaws

Post by tamanegi » May 5th, 2018, 1:13 pm

For example in scenario-01, I can see {TURNS_RUN_OUT} in the beginning of scenario, just before SCENARIO_MUSIC...

# I am not sure about supreme commander problem.. :P
# at least he doesn't appear in my play, only error message appears.
Discord: @tamanegi
It is true that we cannot be free from bugs, but at least let our bugs not always the same...
A Group in a War: my first campaign, An Independence War: and the sequel

User avatar
Argesilao
Posts: 57
Joined: August 28th, 2016, 7:29 pm
Location: Here

Re: Hunted outlaws

Post by Argesilao » May 5th, 2018, 8:19 pm

First of all I suggest to use the tab to indent the code, and make it more readable and understandable.

about the first scenario:

:eng: the macros {TURNS_RUN_OUT} must placed into the tag [objectives] in sostitution of:

[objective]
description= _ "Run out of turns"
condition="lose"
[/objective]
Author and Maintainer of the unofficial campaigns: A Little Adventure, A Magicians Tale, The Three Sisters Saga, Epic Between the Tides

User avatar
Argesilao
Posts: 57
Joined: August 28th, 2016, 7:29 pm
Location: Here

Re: Hunted outlaws

Post by Argesilao » May 5th, 2018, 8:39 pm

Here an example of how the first scenario code should be written to be easy to understand (more of my english I hope :whistle: ).

I also placed the {TURNS_RUN_OUT} macro in the right place

Code: Select all


#textdomain Wesnoth-hunted_outlaws

[scenario]
	id=raiders
	next_scenario=natural_enemies
	random_start_time=no
	name= _ "raiders"
	map_data="{~add-ons/hunted_outlaws/maps/01_Raiders.map}"
	turns=22
	
	{DEFAULT_SCHEDULE}
	{SCENARIO_MUSIC "elvish-theme.ogg"}
	{EXTRA_SCENARIO_MUSIC "nunc_dimittis.ogg"}
	{EXTRA_SCENARIO_MUSIC "silvan_sanctuary.ogg"}
	{EXTRA_SCENARIO_MUSIC "weight_of_revenge.ogg"}
	{PLACE_IMAGE scenery/well.png 12 7}
	{PLACE_IMAGE scenery/oak-leaning.png 15 23}
	{PLACE_IMAGE scenery/rock3.png 8 15}
	{PLACE_IMAGE items/scarecrow.png 17 19}
	
	[side]
		side=1
		controller=human
		team_name="outlaws"
		user_team_name= _ "Outlaws"
		id="Rharyn"
		name= _ "Rharyn"
		type="Poacher"
		[modifications]
			{TRAIT_STRONG}
			{TRAIT_QUICK}
			[object]
				[effect]
					apply_to=image_mod
					add=RC(magenta>darkred)
				[/effect]
			[/object]
		[/modifications]
		[abilities]
			{ABILITY_LEADERSHIP}
		[/abilities]
		unrenameable=yes
		canrecruit=yes
		recruit="Thug, Thief"
		gold=75
		village_support=2
	[/side]
	
	[side]
		side=2
		controller=ai
		team_name="people of Turpin"
		user_team_name= _ "Turpin"
		id="Turpin"
		name= _ "Tabryn"
		type="Sergeant"
		unrenameable=yes
		canrecruit=yes
		recruit="Bowman, Spearman"
		gold=90
	[/side]
	
	[event]
		name=start
		[message]
			speaker=Rharyn
			message= _ "Turpin city ahead!"
		[/message]
		[message]
			speaker=Rharyn
			message= _ "Once a great city but now, now it’s been destroyed from the inside" 
		[/message]
	[/event]
	
	[event]
		name=prestart
		[objectives]
			[objective]
				description= _ "Defeat the enemy leader before reinforcements come"
				condition="win"
			[/objective]
			[objective]
				description= _ "Death of Rharyn"
				condition="lose"
			[/objective]
			{TURNS_RUN_OUT}
			[gold_carryover]
				carryover_percentage=15
			[/gold_carryover]
		[/objectives]
	[/event]
	
	[event]
		name=enemies defeated
		[unit]
			x=21
			y=2
			type=ROLSupreme Commander
			id=Abbud
			name= _ "Abbud"
			side=2
			canrecruit=yes
		[/unit]
		[unit]
			x=21
			y=2
			type=ROLEpic Saber
			id=Banyc
			name= _ "Banyc"
			side=2
		[/unit]
		[unit]
			x=21
			y=2
			type=Royal Guard
			id=Goddyn
			name= _ "Goddyn"
			side=2
		[/unit]
		[unit]
			x=21
			y=2
			type=Royal Guard
			id=Arcec
			name= _ "Arcec"
			side=2
		[/unit]
	[/event]
	
[/scenario]

Author and Maintainer of the unofficial campaigns: A Little Adventure, A Magicians Tale, The Three Sisters Saga, Epic Between the Tides

User avatar
The_Gnat
Posts: 1628
Joined: October 10th, 2016, 3:06 am
Contact:

Re: Hunted outlaws

Post by The_Gnat » May 5th, 2018, 9:02 pm

Congratulations on making a campaign! I will give it a try and see how it goes!

User avatar
Lordlewis
Posts: 286
Joined: July 20th, 2016, 11:15 am
Location: All around, every where. All in one place yet I'm there.-Lordlewis

Re: Hunted outlaws

Post by Lordlewis » May 5th, 2018, 10:29 pm

Another thing I'm not sure about is the gold carry over. For some reason the player brings all of their of plus the gold carry over, I'm not exactly sure why this is happening...
Gold is great!
Swat them bugs!

User avatar
tamanegi
Posts: 130
Joined: August 25th, 2014, 11:38 am
Location: Japan

Re: Hunted outlaws

Post by tamanegi » May 6th, 2018, 1:37 am

I suppose [gold_carryover] just show the message in objective window.
Actual carryover setting should be discribed in [endlevel].

Please take a look at the explanation of that tag:
https://wiki.wesnoth.org/DirectActionsW ... ndlevel.5D
bonus, carryover_percentage, and carryover_add are the relating attributes.
Discord: @tamanegi
It is true that we cannot be free from bugs, but at least let our bugs not always the same...
A Group in a War: my first campaign, An Independence War: and the sequel

User avatar
Argesilao
Posts: 57
Joined: August 28th, 2016, 7:29 pm
Location: Here

Re: Hunted outlaws

Post by Argesilao » May 6th, 2018, 6:25 am

I forgot :doh: if you want to have a defeat at the end of the turns and at the dead of Rharyn you must add to the code these events:

Code: Select all

#defeat at the death of the human's side leader
[event]
	name=die
	[filter]
		id=Rharyn
	[/filter]
	[endlevel]
		result=defeat
	[/endlevel]
[/event]

# defeat at the end of the turns
[event]
	name=time over
	[endlevel]
		result=defeat
	[/endlevel]
[/event]	
What indicated in the objectives tag is a merely information, without effect on the game; to make effective this indication you have to make the appropriate event.
Author and Maintainer of the unofficial campaigns: A Little Adventure, A Magicians Tale, The Three Sisters Saga, Epic Between the Tides

User avatar
Lordlewis
Posts: 286
Joined: July 20th, 2016, 11:15 am
Location: All around, every where. All in one place yet I'm there.-Lordlewis

Re: Hunted outlaws

Post by Lordlewis » May 7th, 2018, 9:52 pm

I think the end turn this is fine now, there is no error and the level ends as failure if the timer runs out. It doesn't really matter to change it so when it does run out it's victory since none of the levels need that. I'm not to sure about the event lua error in the second scenario...
Gold is great!
Swat them bugs!

User avatar
tamanegi
Posts: 130
Joined: August 25th, 2014, 11:38 am
Location: Japan

Re: Hunted outlaws

Post by tamanegi » May 12th, 2018, 12:08 am

Because one of [objective]s does not have "condition" key. (why there are two prestart events...?)
In addition, I can see a nested endlevel tag... :hmm:
Discord: @tamanegi
It is true that we cannot be free from bugs, but at least let our bugs not always the same...
A Group in a War: my first campaign, An Independence War: and the sequel

User avatar
Lordlewis
Posts: 286
Joined: July 20th, 2016, 11:15 am
Location: All around, every where. All in one place yet I'm there.-Lordlewis

Re: Hunted outlaws

Post by Lordlewis » May 16th, 2018, 9:57 pm

It still shows a lua error for some reason... Does it matter much if if there are two prestart and/or start events?
Gold is great!
Swat them bugs!

User avatar
tamanegi
Posts: 130
Joined: August 25th, 2014, 11:38 am
Location: Japan

Re: Hunted outlaws

Post by tamanegi » May 17th, 2018, 9:37 am

You should tell us what is that lua error...
At least, you may need a SCENARIO_MUSIC, EXTRA_SCENARIO_MUSIC is extra. You may need main music in a scenario before extra ones.
Two prestart events are nothing problem. I am bit confused because two of your prestarts are merely for objectives and one of them seem to be ignored (or overwritten?).
Discord: @tamanegi
It is true that we cannot be free from bugs, but at least let our bugs not always the same...
A Group in a War: my first campaign, An Independence War: and the sequel

User avatar
Lordlewis
Posts: 286
Joined: July 20th, 2016, 11:15 am
Location: All around, every where. All in one place yet I'm there.-Lordlewis

Re: Hunted outlaws

Post by Lordlewis » May 17th, 2018, 9:47 am

I don't think this one is a lua error but in the second scenario it says "<Invalid WML found> [event] is missing name or id field"
Also one of the prestarts would of been when I changed the objectives but I forgot to remove the old one.
Gold is great!
Swat them bugs!

Post Reply