Aller au contenu

Photo

How to set/get custom tactics table in scripts ?


  • Veuillez vous connecter pour répondre
4 réponses à ce sujet

#1
anakin5

anakin5
  • Members
  • 258 messages
With functions GetTacticPresetID and SetTacticPresetID we can change the selected tactics table. But it only works for preset tactics because custom tactics tables (1, 2 and 3) have no PresetID (PresetID = 0).

I also checked in var_creature to see if a variable was holding the selected custom tactic table in GUI, but I didn't find anything.

Is there a way to change the tactics table selected in GUI to a custom tactic table. (a function like SetTacticPresetID but for custom tactics tables 1, 2 and 3) ?


Thx for help

Modifié par anakin5, 09 décembre 2009 - 01:41 .


#2
anakin5

anakin5
  • Members
  • 258 messages
bump, I don't know if someone already tested what I am trying to do. I ma looking for a way to know what custom tactics is currently selected by a followers and how to change it to an other custom tactics selection.

#3
anakin5

anakin5
  • Members
  • 258 messages
one last up. Nobody has an idea ?

#4
Hammer Fang

Hammer Fang
  • Members
  • 78 messages
Hello Anakin5, I don't have a answer to your question, and have spent some time looking for the same thing with no luck. You seem to be the 'top' guy on messing around with tactics and I've d/l your advanced tactics mod.

I'm new to the toolset and scripting for these type of things but ....

if the data that holds custom tactics is empty, I don't think an ID would be created until you put
something in there.

like when I've tried to get Morrigan to change to bearshape and with tactics use her abilities, I was unable to do so, UNLESS I left her in bear shape. The pointer for the action in tactics to do the slam would only work once, and no longer be valid if she changes back to human, and then back to bear.

what I'm trying to say is, play the game, and save 'something' in the custom tactics, and then see if you can find the ID.

in the mean time, I've just gotten the toolset to work for me, and I'll be playing catchup to you on doing extra things with tactics.

Modifié par Hammer Fang, 14 décembre 2009 - 01:44 .


#5
anakin5

anakin5
  • Members
  • 258 messages
when I set a character to use Custom 1 tactics and run a debug script with a GetTacticPresetID function, it return 0.

It makes sens to me because Custom 1, 2 and 3 are not Preset Tactics.



I saw that Custom tactics 1, 2 and 3 are saved in savegame. If you scroll down the tactics menu ingame, I think SetTacticPresetID is called when you select a Preset tactics. It load the preset tactics into the "current" tactics table.

But if you choose a custom tactics, an other function is called to load the custom table into the "current" tactics table, and I can't find this function.



About morrigan using tactics in bearshape, I already succed to do it but it had non sense because the tactics was set to use spells that was not available in shape. That's one of the reason why I want a way to switch tactics. The result will be something like :



Custom tactics 1

IF [Morrigan : Target of melee attack] THEN [Activate Bearshape]

IF [Self: Polymorphed] THEN [Use custom tactics 2]



Custom tactics 2

....

IF [Morrigan : Surrounded by 0 enemies] THEN [Deactivate Bearshape]

IF [Morrigan : Surrounded by 0 enemies] THEN [Use custom tactics 1]