SFTtech / openage

Free (as in freedom) open source clone of the Age of Empires II engine 🚀
http://openage.dev
Other
12.6k stars 1.11k forks source link

Scripting API #735

Open TheJJ opened 7 years ago

TheJJ commented 7 years ago

As our ultimate goal is cool moddability, and not everything can be done with data mods (with nyan #734) we also need scripting support.

This consists of multiple parts that need to be done:

timo-42 commented 7 years ago

if the api has access to the whole gamestate

it can determine if a player has lost and will be removed from game => so every gametype can is possible by simple providing a python script

TheJJ commented 7 years ago

Yes, it should be possible then. What other gametypes do you have in mind?

timo-42 commented 7 years ago

The Standard ones: Defend the Wonder, Conquest, King of the Hill, Conquest

New types:

other stuff:

yani commented 7 years ago

Will the normal game be done within this API? I remember vanilla Call of Duty having all of their gametype code as "mods".

timo-42 commented 7 years ago

what is normal gametype? conquest=> (1: all own units destroyed) and (2: all own towncenters destroyed) and (3: all own villagers dead) and (4: all own buildings destroyed) => I lost (5: all enemies have lost) => I win

hooks: 1-5 will be implemented as hooks, so yeah everything will be a "mod". It will be a big API, if we want everything as accessible as hook.

TheJJ commented 7 years ago

@Yanikore yes exactly. The converted data from the original game is then just a data pack for the engine that happens to behave and look as aoe2.