Editing unit attiributes with debug?

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
anl93
Posts: 22
Joined: August 27th, 2012, 5:18 pm

Editing unit attiributes with debug?

Post by anl93 »

Hello there i hope i opened the topic in a correct place. So i want to ask something speceific.
I know we can chance the single units move points, max hp, upkeep and so on without affecting the faction or same unit classes wia debug.
can i chance specific unit's
1)resistance (cold resistance to dragon for example.),
2) defence ratings?
3) attack damage or probabalities?
if answers are the yes can you tell me how? Thank you.

Single player purpose only.
User avatar
Ravana
Forum Moderator
Posts: 3000
Joined: January 29th, 2012, 12:49 am
Location: Estonia
Contact:

Re: Editing unit attiributes with debug?

Post by Ravana »

not available without modification that evaluates the commands
1,2,3a) Easy enough, use :inspect to see how units are put together, to access tags use like attacks[0].damage, so tagname[index from 0 to n-1].property
3b) Possible, but non-trivial. You need to line by line construct new weapon special for that.

I believe it is suitable place, since effectively you write temporary WML in game this way.
Edit: Actually, seems that standard command cant do it this way. I have been using debug [modification] to make debug more powerful and easier to use and also available in networked games... forgot that core lacks there.

:lua should be capable out of core commands, however that isnt very comfortable for this.
Post Reply