ForestDragon's WML questions

The place to post your WML questions and answers.

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.
Post Reply
User avatar
ForestDragon
Posts: 1771
Joined: March 6th, 2014, 1:32 pm
Location: Ukraine

Re: ForestDragon's WML questions

Post by ForestDragon »

nope it is .cfg,and in the right place, and about syntax error, what do you mean? i am curious.btw,the tricky part is:it shows in the add-on menu (in delete addon, and upload addon, so _main.cfg is 100% innocent here)
My active add-ons: The Great Steppe Era,XP Bank,Alliances Mod,Pestilence,GSE+EoMa,Ogre Crusaders,Battle Royale,EoMaifier,Steppeifier,Hardcoreifier
My inactive add-ons (1.12): Tale of Alan, The Golden Age
Co-creator of Era of Magic
User avatar
ForestDragon
Posts: 1771
Joined: March 6th, 2014, 1:32 pm
Location: Ukraine

Re: ForestDragon's WML questions

Post by ForestDragon »

i tried to use Age of Tentacles' s infect weapon spec, the plague part works, but the poison-like effect doesn't, and the thing is, i even copy-pasted the entire abilities file, and to now avail.btw, when i have AoT installed, it works, but when i don't, even with the fully 100% identical text, it still doesn't work. how comes? :(
My active add-ons: The Great Steppe Era,XP Bank,Alliances Mod,Pestilence,GSE+EoMa,Ogre Crusaders,Battle Royale,EoMaifier,Steppeifier,Hardcoreifier
My inactive add-ons (1.12): Tale of Alan, The Golden Age
Co-creator of Era of Magic
User avatar
ForestDragon
Posts: 1771
Joined: March 6th, 2014, 1:32 pm
Location: Ukraine

Re: ForestDragon's WML questions

Post by ForestDragon »

hi, is there a way to male AI recall units? (i know how to manually put units into recally list with WML, but i am unsure how to make SP AI recall those units)
My active add-ons: The Great Steppe Era,XP Bank,Alliances Mod,Pestilence,GSE+EoMa,Ogre Crusaders,Battle Royale,EoMaifier,Steppeifier,Hardcoreifier
My inactive add-ons (1.12): Tale of Alan, The Golden Age
Co-creator of Era of Magic
User avatar
beetlenaut
Developer
Posts: 2825
Joined: December 8th, 2007, 3:21 am
Location: Washington State
Contact:

Re: ForestDragon's WML questions

Post by beetlenaut »

The AI will automatically recall units if it has them. The tricky part is that it won't be given a recall list unless it is persistent=yes. Without that, putting units in the recall list will just silently fail.

The reason nobody answered your previous questions is probably because you say: "I did everything right, and it doesn't work." Obviously you didn't do everything right or it would work, but if you don't show us what you did and where you put your code, we can't help you. Oh, but a "syntax error" is an error in your code that prevents it from loading--a missing tag or quotation mark for example. You get an error message.
Campaigns: Dead Water,
The Founding of Borstep,
Secrets of the Ancients,
and WML Guide
gfgtdf
Developer
Posts: 1432
Joined: February 10th, 2013, 2:25 pm

Re: ForestDragon's WML questions

Post by gfgtdf »

beetlenaut wrote:The AI will automatically recall units if it has them. The tricky part is that it won't be given a recall list unless it is persistent=yes. Without that, putting units in the recall list will just silently fail.
This should be no longer true in wesnoth 1.13, in wesnoth 1.13 persitent=no (default for ai sides) will just prevent the units from presititng to the next scenario but it'll still be possibel to maually put unit to the dies recall list for that scenario.
Scenario with Robots SP scenario (1.11/1.12), allows you to build your units with components, PYR No preperation turn 1.12 mp-mod that allows you to select your units immideately after the game begins.
User avatar
ForestDragon
Posts: 1771
Joined: March 6th, 2014, 1:32 pm
Location: Ukraine

Re: ForestDragon's WML questions

Post by ForestDragon »

well, i meant this actually: i know how to inject units into the list (sorry for repetitiveness) but i want the ai to, say, have higher priority of recalling over recruiting (what i am going for, is i want an ai side to have some units in the recally list at start (already know hoe to) and to make the ai recall them)
also, how about i post the addon folder for your convienience (i intentionally removed password and email from server.pbl) btw, i already fixed the mod not showing up, and but mod and menu into a single file, i only have trouble with the variables right now (i have $stored_exp_current| in the menu, yet it doesn't shoe up :( (maybe there is something wrong with variables themselves :hmm: )):
xpbank.zip
in an archive, if you want to look
(9.66 KiB) Downloaded 161 times
Last edited by ForestDragon on June 15th, 2016, 6:13 pm, edited 1 time in total.
My active add-ons: The Great Steppe Era,XP Bank,Alliances Mod,Pestilence,GSE+EoMa,Ogre Crusaders,Battle Royale,EoMaifier,Steppeifier,Hardcoreifier
My inactive add-ons (1.12): Tale of Alan, The Golden Age
Co-creator of Era of Magic
gfgtdf
Developer
Posts: 1432
Joined: February 10th, 2013, 2:25 pm

Re: ForestDragon's WML questions

Post by gfgtdf »

like beetlenaut said, the ai will usualyl automaticall recall units instead of recuiting if it has enogh gold (and if its worth i am unsire whether it would recall a 12 gold cost unit, when recalling costs 20 gold). but putting them on the rcall list is ratehr tricky, did you check that they are really on the enemies recall list (by using :inspect for example) ?
Scenario with Robots SP scenario (1.11/1.12), allows you to build your units with components, PYR No preperation turn 1.12 mp-mod that allows you to select your units immideately after the game begins.
User avatar
ForestDragon
Posts: 1771
Joined: March 6th, 2014, 1:32 pm
Location: Ukraine

Re: ForestDragon's WML questions

Post by ForestDragon »

i used a method with a unit's ability that automatically put a unit to it's side's recall list (works flawlessly for my side)
My active add-ons: The Great Steppe Era,XP Bank,Alliances Mod,Pestilence,GSE+EoMa,Ogre Crusaders,Battle Royale,EoMaifier,Steppeifier,Hardcoreifier
My inactive add-ons (1.12): Tale of Alan, The Golden Age
Co-creator of Era of Magic
gfgtdf
Developer
Posts: 1432
Joined: February 10th, 2013, 2:25 pm

Re: ForestDragon's WML questions

Post by gfgtdf »

Like beetenaut said, worikingw flawlessly for your side doesn't imply that it flawlessly works for the ai side (at lest in wesnoth 1.12 which i assume you are using), i still reccomend to check whether the units are reall on the ai side by eigher using debug mode :inspect or taking over the ai side with :droid after the recall units were added, and look at the reall list yourself.

If the propblem is really that the ai doesn't recall them, then that might be casues by the ai thinking them of unworthly of the 20 gold recall cost. There is afaik a ai.recall function in a lua ai code. unfortunateley i'm not expert for ai internals but mattsc might know.
Scenario with Robots SP scenario (1.11/1.12), allows you to build your units with components, PYR No preperation turn 1.12 mp-mod that allows you to select your units immideately after the game begins.
User avatar
ForestDragon
Posts: 1771
Joined: March 6th, 2014, 1:32 pm
Location: Ukraine

Re: ForestDragon's WML questions

Post by ForestDragon »

ok, i will check using :droid
and yes, i am using 1.12 (going to update when 1.14 comes out, but until then...)
EDIT:checked, can't access the menu in the ai side :| , well, that explains it, i guess
My active add-ons: The Great Steppe Era,XP Bank,Alliances Mod,Pestilence,GSE+EoMa,Ogre Crusaders,Battle Royale,EoMaifier,Steppeifier,Hardcoreifier
My inactive add-ons (1.12): Tale of Alan, The Golden Age
Co-creator of Era of Magic
User avatar
beetlenaut
Developer
Posts: 2825
Joined: December 8th, 2007, 3:21 am
Location: Washington State
Contact:

Re: ForestDragon's WML questions

Post by beetlenaut »

Well, I see your variable problem. This doesn't make any sense: value=$exp_stored_$side_number. I'm not sure what you're trying to do here, but whatever it is, this won't do it.

Using droid in this case is fine, but you should probably get used to using :inspect too. It's your friend, and the first thing you should check when something goes wrong. Make sure your variables or units look like you think they should.
Campaigns: Dead Water,
The Founding of Borstep,
Secrets of the Ancients,
and WML Guide
User avatar
ForestDragon
Posts: 1771
Joined: March 6th, 2014, 1:32 pm
Location: Ukraine

Re: ForestDragon's WML questions

Post by ForestDragon »

well, i already made an edit (but that was on a different device) that turned variable 'stored_exp_$side_number' into 'stored_exp_current' and back/fourth
My active add-ons: The Great Steppe Era,XP Bank,Alliances Mod,Pestilence,GSE+EoMa,Ogre Crusaders,Battle Royale,EoMaifier,Steppeifier,Hardcoreifier
My inactive add-ons (1.12): Tale of Alan, The Golden Age
Co-creator of Era of Magic
User avatar
beetlenaut
Developer
Posts: 2825
Joined: December 8th, 2007, 3:21 am
Location: Washington State
Contact:

Re: ForestDragon's WML questions

Post by beetlenaut »

:annoyed: Fine. If you still have a problem, explain what you want to happen, what does happen, and show the actual code.
Campaigns: Dead Water,
The Founding of Borstep,
Secrets of the Ancients,
and WML Guide
User avatar
Ravana
Forum Moderator
Posts: 3002
Joined: January 29th, 2012, 12:49 am
Location: Estonia
Contact:

Re: ForestDragon's WML questions

Post by Ravana »

beetlenaut wrote:Well, I see your variable problem. This doesn't make any sense: value=$exp_stored_$side_number. I'm not sure what you're trying to do here, but whatever it is, this won't do it.
Why wouldnt it make sense? Second $ range ends normally, so there is no need to add |.
User avatar
ForestDragon
Posts: 1771
Joined: March 6th, 2014, 1:32 pm
Location: Ukraine

Re: ForestDragon's WML questions

Post by ForestDragon »

hi, it's kind of a stupid question, but how exactly make another addon a dependancy for the one with the server.pbl file in the .pbl file itself is it

Code: Select all

'requires=' ,'requirement=' ot 'require=' ?
My active add-ons: The Great Steppe Era,XP Bank,Alliances Mod,Pestilence,GSE+EoMa,Ogre Crusaders,Battle Royale,EoMaifier,Steppeifier,Hardcoreifier
My inactive add-ons (1.12): Tale of Alan, The Golden Age
Co-creator of Era of Magic
Post Reply