A few questions

Discussion and development of scenarios and campaigns for the game.

Moderator: Forum Moderators

Post Reply
Draciron
Posts: 17
Joined: March 25th, 2006, 2:14 am

A few questions

Post by Draciron »

I've been developing some campaigns. One of them is rather grandiose. The last couple of maps involve very large armies. I am running into the same problem that happens on the mystery campaign. Leaders who refuse to spend but a faction of their gold. In the mystery campaign I'll kill the enemy leader while he has 10k of gold in his pocket and recruiting only 4 guys. There is an aggressive mode I believe. How do you add that? I suspect you have to edit the campaign files manually. I've been able to fix it some by putting an insane number of village out there. Seems to be income related. This had the negitive side effect of arriving at the last stage with too much money. No challenge in it since by the end the player of course controls all those zillion villages.

One of my campaigns is just about ready for beta testing. I would really like to get a few opinions on it. Being my first I'm sure it needs lots of improvements. How can I bundle a campaign so that others can use it and is there a beta test area where willing victims play such campaigns. I'd be willing to beta test and critque other's efforts in return. What I don't want to do is release it to the public until I've made those improvements. Having played so many buggy campaigns where you get 5 maps in and it cannot find the next map or doesn't have the needed units to continue, or even a poorly designed scenario you get a bad taste for that campaign instantly. I've also seen comments on the forum about the same frustrations from other users. Would like to have the big problems worked out before then.

I'm still finding it a little unclear how to place an object on the map. I'd like to give the user in the 2nd to last stage a gold bonus if they need it since it's literally impossible to finish the last two maps without a large amount of gold. I've been able to create events using the campaign editor but unable to place an object. Nor can I find documentation on the if then structure or what vars are availible so that I can compare the gold and not place the bonus if the user has sufficient gold to take on the next level. I want it to be challenging but I don't want to make them play the whole campaign over again just to have enough gold to finish the last map or two. Is there a FAQ for this topic?

On my newest campaign I want to create an Orc watchman unit. The idea is to make them very vulnerable to archers, which is piercing weapons correct ? I'd also like to make it vulnerable to a thief's backstab ability. No idea how to do that. I want them as aunit to have resistance to melee and blunt weapons. I havn't found a way in the campaign generator to edit such atributes.

It's not possible to give a unit an action is it? I'd love to be able to have them to have the attribute of attracting Orc grunts if you do not kill it quickly enough. Is that possible with the current game?

Question summary.

How to bundle campaign files so that another user can add it to their computer without publishing it publically.

How assign a NPC aggressive mode to force them to spend all of their gold even if it pushes them into negitive incomes.

How to edit a unit to add vulnerabilities and resistances.

How to place an object and read game vars like gold, turn, etc. Is there a list of such vars availible? Syntax examples?

Can units have triggers? If so how can you add them? Is there another way if not. The effect would be to summon units should that unit be involved in contact or sense enemy units. Preferably these units would not exist until such event was triggered but would be called based on a randomized gold setting to spend. A possible alternate would be to give them a place to recruit and the ability to do so which is what I'm doing now but I'd like a more elegant solution if such exists. The map generator limits you to 10 max factions If you have 8 sentries then that limits you to 2 enemy leaders. Only 1 if you have to expend one for the player.

Is there a testing server/forum to beta test campaigns without other foolhardy Wesnoth fanatics?

Thanks
SpenceLack
Posts: 64
Joined: January 22nd, 2007, 4:29 am

Post by SpenceLack »

I'm new at creating stuff for wesnoth too, so I can only help you with one question.

You can include scenarios as an attachment to posts in this forum, so playtester volunteers can test them. The cfg file and folder go in the Wesnoth user/campaigns folder, accessible from the data menu while running Battle for Wesnoth.
MarkP
Posts: 77
Joined: December 11th, 2006, 2:18 am
Location: Sydney, Australia

Re: A few questions

Post by MarkP »

Draciron wrote:How to bundle campaign files so that another user can add it to their computer without publishing it publically.
As SpenceLack said, you can post it here - zip the campaign.cfg file and the campaign directory up together and attach it to your post. That way it's available through the forums, but not the campaign server.
Draciron wrote:How assign a NPC aggressive mode to force them to spend all of their gold even if it pushes them into negitive incomes.
I've had similar problems, and while there doesn't appear to be any direct way to control that, there are a few things you can do to make it more likely they'll recruit more. Firstly, make sure that the map suits their units, at least to an extent - putting a leader with mermen in hills, it's unlikely they'll recruit too many mermen! OK, that's a bit of an exaggeration, but you get the idea. Ways you can directly control the AI in WML can be found here: http://www.wesnoth.org/wiki/AiWML#the_.5Bai.5D_tag - setting the aggression high may help, as may recruitment_ignore_bad_movement and recruitment_ignore_bad_combat. Not sure about doing it in campgen as I don't generally use it.
Draciron wrote:How to edit a unit to add vulnerabilities and resistances.
You need to create a new unit.cfg file - best bet would be to take an existing one and modify it as needed. Don't think you can make a unit weak against backstab though, as this is an ability, not an attack type.
Draciron wrote:How to place an object and read game vars like gold, turn, etc. Is there a list of such vars availible? Syntax examples?
Placing an object is done with the [item] tag: http://www.wesnoth.org/wiki/InterfaceAc ... rface_tags If you want something to happen when a unit moves to that location, you then also need to add a moveto event.

I don't know of a list of predefined variables, but the syntax follows standard WML syntax: http://www.wesnoth.org/wiki/SyntaxWML

You may also find something here that will help: http://www.wesnoth.org/wiki/UsefulWMLFragments

Again, I'm not sure how to do any of it in campgen.
Draciron wrote:Can units have triggers?
Not as such, no.
Draciron wrote:Is there another way if not. The effect would be to summon units should that unit be involved in contact or sense enemy units.
That can be pretty easily done with standard events - when that unit is attacked or attacks, add extra units to that side. Sensing enemy units might be a bit more difficult depending on exactly what you mean. You can trigger an event when one team/unit sights another team/unit, but I'd probably need to see more detail of what you're trying to do before I could offer any more detail myself.

Bear in mind that I'm relatively new to WML myself, but I'm happy to offer any assistance I can. If you want to post your campaign here I'm happy to take a look at the WML for you and try and give you some help.

HTH,

Mark
This signature intentionally left blank.
User avatar
BlackOpsElf
Posts: 95
Joined: June 22nd, 2006, 8:25 pm

Re: A few questions

Post by BlackOpsElf »

Draciron wrote:I've been developing some campaigns. One of them is rather grandiose. The last couple of maps involve very large armies. I am running into the same problem that happens on the mystery campaign. Leaders who refuse to spend but a faction of their gold. In the mystery campaign I'll kill the enemy leader while he has 10k of gold in his pocket and recruiting only 4 guys. There is an aggressive mode I believe. How do you add that? I suspect you have to edit the campaign files manually. I've been able to fix it some by putting an insane number of village out there. Seems to be income related. This had the negitive side effect of arriving at the last stage with too much money. No challenge in it since by the end the player of course controls all those zillion villages.
Set the income for the NPC to an insanely high amount (with the "income" WML script). If they stop recruiting once they get in to negative income, then just make sure that they never actually get into the negatives. This way, you can give them the ability to recruit a huge number of troops without increasing the village count, which would have the undesired effect of boosting the player income.

Set the NPC to something like 50 income per turn, and see how that effects things. If that isn't enough, bring it up to 100. I think this should work.
Creator and Maintainer of "Where Angels Fear To Tread"
im the one you think of
Posts: 104
Joined: September 2nd, 2005, 6:06 pm
Location: portsmouth, u.k.

Re: A few questions

Post by im the one you think of »

BlackOpsElf wrote:
Draciron wrote:I've been developing some campaigns. One of them is rather grandiose. The last couple of maps involve very large armies. I am running into the same problem that happens on the mystery campaign. Leaders who refuse to spend but a faction of their gold. In the mystery campaign I'll kill the enemy leader while he has 10k of gold in his pocket and recruiting only 4 guys. There is an aggressive mode I believe. How do you add that? I suspect you have to edit the campaign files manually. I've been able to fix it some by putting an insane number of village out there. Seems to be income related. This had the negitive side effect of arriving at the last stage with too much money. No challenge in it since by the end the player of course controls all those zillion villages.
Set the income for the NPC to an insanely high amount (with the "income" WML script). If they stop recruiting once they get in to negative income, then just make sure that they never actually get into the negatives. This way, you can give them the ability to recruit a huge number of troops without increasing the village count, which would have the undesired effect of boosting the player income.

Set the NPC to something like 50 income per turn, and see how that effects things. If that isn't enough, bring it up to 100. I think this should work.
That might work, but what he should be doing is setting the sides 'aggression' and 'caution' rates tohiger and lower amounts respectively.

Draciron, to do that you need to open the scenario in question's text file, and write:
[ai]
aggression="1"
caution="0"
[/ai]

I'm not sure if campgen will of already created an 'AI' section but if it has just add the aggression and caution bits there
joshudson
Posts: 501
Joined: January 17th, 2006, 8:04 pm
Contact:

Re: A few questions

Post by joshudson »

MarkP wrote:
Draciron wrote:How to edit a unit to add vulnerabilities and resistances.
You need to create a new unit.cfg file - best bet would be to take an existing one and modify it as needed.
I thought for sure I added the ability to do that with an item in 1.1.3.
CHKDSK has repaired bad sectors in CHKDSK.EXE
Imp
Posts: 317
Joined: January 8th, 2007, 10:56 am

Re: A few questions

Post by Imp »

BlackOpsElf wrote:
Draciron wrote:I've been developing some campaigns. One of them is rather grandiose. The last couple of maps involve very large armies. I am running into the same problem that happens on the mystery campaign. Leaders who refuse to spend but a faction of their gold. In the mystery campaign I'll kill the enemy leader while he has 10k of gold in his pocket and recruiting only 4 guys. There is an aggressive mode I believe. How do you add that? I suspect you have to edit the campaign files manually. I've been able to fix it some by putting an insane number of village out there. Seems to be income related. This had the negitive side effect of arriving at the last stage with too much money. No challenge in it since by the end the player of course controls all those zillion villages.
Set the income for the NPC to an insanely high amount (with the "income" WML script). If they stop recruiting once they get in to negative income, then just make sure that they never actually get into the negatives. This way, you can give them the ability to recruit a huge number of troops without increasing the village count, which would have the undesired effect of boosting the player income.

Set the NPC to something like 50 income per turn, and see how that effects things. If that isn't enough, bring it up to 100. I think this should work.
It might hel initially, but then he'd have to set events that reduce the AI's income as the player makes progress, otherwise they'll be fighting forever.
MarkP
Posts: 77
Joined: December 11th, 2006, 2:18 am
Location: Sydney, Australia

Re: A few questions

Post by MarkP »

joshudson wrote:I thought for sure I added the ability to do that with an item in 1.1.3.
Ah, perhaps I misunderstood Draciron - as he was talking about creating an Orcish Watchman, I was thinking of adding abilities to a new unit type, rather than changing an existing unit e.g. via an item.
This signature intentionally left blank.
Draciron
Posts: 17
Joined: March 25th, 2006, 2:14 am

Post by Draciron »

Thank you everybody. I have lots of stuff to try out to get the gold thing settled.

Started a new thread with the campaign attached.

On the Orc Watchman, thanx. If I can set an on attack value that should suffice for what I want to do.

Too bad on the backstab ability. The goal of this particuler scenario is that the player needs to sneak into a fortified area and steal an item and return. The player will get archers, thieves and such and have to rely on stealth to get through the first map. So the idea is to give them units which are easily killed by stealthy units like Thieves and archers but if the attempt to quickly kills them fails then all hell breaks loose and the scenario turns into a mad dash for the object through a hail of enemy attacks. Obviously the stealthy approach is more likely to succeed and wiser :) So I want to make it really easy to kill if you put two or three archers on it but a bear to kill if it gets to fight back. What I'll probably do is give it very low HP but massive blade damage as incentive to make sure that he dies before ever getting to fight back :)

1.1.3? Wesnoth or campgen? I'm using
version 0.21
python version 2.4.4 (#1, Oct 23 2006, 13:58:00) [GCC 4.1.1 20061011 (Red Hat 4.1.1-30)]
wxwidgets version 2.6.3.2

As my version. Seems to be the most recent version of Campgen. I think I'm a version back on Wesnoth. I'm using 1.1.12 right now. Would upgrading to 1.1.13 fix any of those issues?

Will be trying the many suggestions on my other questions. Thanks again on the ideas.
Post Reply