Log in

View Full Version : Guide: The Complete Guide to Plugins - Discussion Thread



Squid
04-02-2008, 15:54
This thread is to discuss any of the information contained in the Guide: The Complete Guide to Plugins (https://forums.totalwar.org/vb/showthread.php?p=1879225).

Plugins up until now have been a black box, Gotthard and I over at twcenter have made some interesting discoveries on using plugins in game.

Myrddraal
04-04-2008, 15:03
Hmm, interesting stuff. So beyond existing, plugins don't affect gameplay directly, what you're saying is you can use them as a tool for scripting right?

PS, have you added this to the tutorials database?

Squid
04-04-2008, 15:37
From what we've discovered, they don't affect gameplay directly at all, according to the quote from Jerome, they don't exist at all as far as the AI is concerned, but we can use them in scripting and in any triggers (trait/advice/ancillary) that we want.

And thanks for reminding me, I'll add it to the database, I'd actually just posted the guide itself.

Bardo
04-06-2008, 22:06
Thank you Squid for this guide.
Even when I believe it do not open any new scripting possibilities that were not already there due to Buildings (GovernorBuildingExists and GovernorBuildingFinished), the plugins seem to be easier to implement.

Sometimes I need a building to stop some scripts from being triggered twice, but since I do not manage the building files (I'm just the scripter), I need other people in the modding team to include the new building, the new images, etc... It is good to know the plugins do not need extra ui files :beam:.


Dramatically increases the trait customization that can be done (use to add traits based on control, after x turns of control remove the original cultural plugin and replace with a new one for the new faction)
Wait! Does it mean it is possible to remove Plugins using scripts?, because this would indeed increase a lot the possibilities of the scripts. How do you manage to destroy the plugins?

Btw, a little mistake in the guide: you wrote console_command construct_building instead of create_building.

Squid
04-08-2008, 16:20
Thank you Squid for this guide.
Even when I believe it do not open any new scripting possibilities that were not already there due to Buildings (GovernorBuildingExists and GovernorBuildingFinished), the plugins seem to be easier to implement.

Sometimes I need a building to stop some scripts from being triggered twice, but since I do not manage the building files (I'm just the scripter), I need other people in the modding team to include the new building, the new images, etc... It is good to know the plugins do not need extra ui files :beam:.


Wait! Does it mean it is possible to remove Plugins using scripts?, because this would indeed increase a lot the possibilities of the scripts. How do you manage to destroy the plugins?

Btw, a little mistake in the guide: you wrote console_command construct_building instead of create_building.

I corrected the Guide, as of yet we can't remove plugins via script any more than buildings can be removed. I misunderstood some information Gottard was telling me, probably because it sounded so much better that way, and though building could be destoryed via script, when Gotthard was actually talking about actually destorying the building with the plugin via the UI. :D

Also fixed the typo in the create_building command.

Bardo
04-09-2008, 00:55
Anyway, it is an useful option for scripters, thank you for your researches on this matter.

Squid
07-02-2008, 16:01
Answering some questions from the guide thread itself. If questions could be posted here in the future it would be appreciated.


This is really awesome! Will test this straight away, thanks for the findings! Have you tested if the building_present_min_level thing responds to plugins?
EDIT: just noticed that I shouldn't be posting in this thread. Also tried many different implementation methods of the building_present_min_level thing - none of them worked, like expected. But still the amount of possibilities for traits etc increase significantly. Will keep on experimenting ;)

We haven't had time to do furthur research, but as of this time, we have not found a way to test for their presence in EDB. We did get some odd errors, that seemed to indicate that there might be a way to get it work.


This is really awesome and opens up many possibilities.
So what can the plugin offer other than the name? Can it act as a sub-building with building-like capabilities (bonuses, unit recruitment, etc)?

Currently, there is no known way to add capabilities of any sort to a plugin, or to link buiding level capabilities to the presence of a plugin. Plugins' main use is as a scripting aid, as well as for traits/ancillaries and stuff.

Spizania
07-05-2008, 22:12
This might be a bit of a silly question, but how would you use a script to change the level of the plugin you have on the building? and I may have misunderstood this, but can you have more than one plugin "tree" active on the same building at the same time?