Create own effects types?

Contribute, display and discuss rulesets and modpacks for use in Freeciv here.
Post Reply
BadPractice
Posts: 4
Joined: Mon Oct 20, 2014 11:59 am

Create own effects types?

Post by BadPractice »

HI,
I found in the wiki a list of effect types (like Tech_Parasite, Growth_Food etc)

Is it possible to create his own effect types(via lua script or so)?
sveinung
Elite
Posts: 548
Joined: Wed Feb 20, 2013 4:50 pm

Re: Create own effects types?

Post by sveinung »

BadPractice wrote:Is it possible to create his own effect types
You could always write a patch adding the new effect. If you submit it to our patch tracker and we like it it may even be included in standard Freeciv. If it is included you (or your players) won't have to build a custom version of Freeciv including your patch for each kind of system you wish to support with your ruleset.
BadPractice wrote:(via lua script or so)?
Not yet. One of the first patches I sent to Freeciv was to allow this. (It don't work any more) Haven't looked at it for years. One problem of implementing it that I didn't know back then is to make the built in AI handle custom effects. That could be solved by a static numeric value showing how bad/good x amount of the effect is. It could also be solved by a Lua call back giving the same value but that is more expensive (measured in performance). If you are interested I could try to finish it, but it probably won't be a part of official Freeciv before version 3.0.
Post Reply