Roaming units

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
MadMax
Posts: 1792
Joined: June 6th, 2004, 3:29 pm
Location: Weldyn, Wesnoth

Post by MadMax »

scott wrote:But, as Mad Max knows, you can't make them roam around aimlessly (can't you?).
Yes you can, although it won't respect terrain or traits. I do it with the birds in scenario 4. What's actually needed is a new AI, which can be similar to the one in existence, just with a larger random factor and with the attack algorithms removed.
"ILLEGITIMIS NON CARBORUNDUM"

Father of Flight to Freedom
http://www.wesnoth.org/wiki/FlightToFreedom
User avatar
Elvish_Pillager
Posts: 8137
Joined: May 28th, 2004, 10:21 am
Location: Everywhere you think, nowhere you can possibly imagine.
Contact:

Post by Elvish_Pillager »

MadMax wrote:
scott wrote:But, as Mad Max knows, you can't make them roam around aimlessly (can't you?).
Yes you can, although it won't respect terrain or traits.
With more awkward WML, you can make it respect them...
It's all fun and games until someone loses a lawsuit. Oh, and by the way, sending me private messages won't work. :/ If you must contact me, there's an e-mail address listed on the website in my profile.
scott
Posts: 5243
Joined: May 12th, 2004, 12:35 am
Location: San Pedro, CA

Post by scott »

I meant with [ai]. I can't get no_leader sides to do anything with [ai]. They act as guardians.
Hope springs eternal.
Wesnoth acronym guide.
MadMax
Posts: 1792
Joined: June 6th, 2004, 3:29 pm
Location: Weldyn, Wesnoth

Post by MadMax »

Elvish Pillager wrote:
MadMax wrote:Yes you can, although it won't respect terrain or traits.
With more awkward WML, you can make it respect them...
How would you do this?
"ILLEGITIMIS NON CARBORUNDUM"

Father of Flight to Freedom
http://www.wesnoth.org/wiki/FlightToFreedom
User avatar
Elvish_Pillager
Posts: 8137
Joined: May 28th, 2004, 10:21 am
Location: Everywhere you think, nowhere you can possibly imagine.
Contact:

Post by Elvish_Pillager »

Presumably you know the terrain, and you can find out traits by storing the unit. With that knowledge, you should be able to adapt the algorithm...
It's all fun and games until someone loses a lawsuit. Oh, and by the way, sending me private messages won't work. :/ If you must contact me, there's an e-mail address listed on the website in my profile.
MadMax
Posts: 1792
Joined: June 6th, 2004, 3:29 pm
Location: Weldyn, Wesnoth

Post by MadMax »

Elvish Pillager wrote:Presumably you know the terrain, and you can find out traits by storing the unit. With that knowledge, you should be able to adapt the algorithm...
In other words, I would need an array of every tile on the map with a cerain terrain?

PS. can you move this to Scenario & Campaign Development?
"ILLEGITIMIS NON CARBORUNDUM"

Father of Flight to Freedom
http://www.wesnoth.org/wiki/FlightToFreedom
Disto
Posts: 2039
Joined: November 1st, 2004, 7:40 pm
Location: Cambridge, UK

Post by Disto »

This is a art thread :roll: , but it should be split.
Creator of A Seed of Evil
Creator of the Marauders
Food or Wesnoth? I'll have Wesnoth
User avatar
Elvish_Pillager
Posts: 8137
Joined: May 28th, 2004, 10:21 am
Location: Everywhere you think, nowhere you can possibly imagine.
Contact:

Post by Elvish_Pillager »

MadMax wrote:
Elvish Pillager wrote:Presumably you know the terrain, and you can find out traits by storing the unit. With that knowledge, you should be able to adapt the algorithm...
In other words, I would need an array of every tile on the map with a cerain terrain?
Well, it's also possible with [store_locations] to reduce the requirement to a list of terrains present on the map.
MadMax wrote:PS. can you move this to Scenario & Campaign Development?
I can't, but someone else can...
It's all fun and games until someone loses a lawsuit. Oh, and by the way, sending me private messages won't work. :/ If you must contact me, there's an e-mail address listed on the website in my profile.
freim
Retired Terrain Art Director
Posts: 1113
Joined: November 29th, 2003, 11:40 pm
Location: Norway

Post by freim »

scott
Posts: 5243
Joined: May 12th, 2004, 12:35 am
Location: San Pedro, CA

Post by scott »

Does [ai] work normally with leaderless units or not at all?
Hope springs eternal.
Wesnoth acronym guide.
scott
Posts: 5243
Joined: May 12th, 2004, 12:35 am
Location: San Pedro, CA

Post by scott »

What if you edited goto_x and goto_y before each turn?
Hope springs eternal.
Wesnoth acronym guide.
Post Reply