Extension API?

Post new mods and scenarios here.

Moderator: MOD_Command

Post Reply
I1066
Posts: 86
Joined: Tue Oct 22, 2013 3:26 pm

Extension API?

Post by I1066 »

Is there any extension API available? Like, for example, MEF?

Or any other API for that matter?
User avatar
wqc12345
Posts: 176
Joined: Mon Dec 07, 2015 2:56 pm
Location: San Francisco, CA

RE: Extension API?

Post by wqc12345 »

It's all lua methods. These are made and exposed by the game developers. They are pretty useful in scripting events along with traditional lua. Lua has a rich set of libs that are part of the standard lua console or can be loaded as script actions and be used as functions in your scripts.

There are no other exposed APIs that I know of outside this.
I1066
Posts: 86
Joined: Tue Oct 22, 2013 3:26 pm

RE: Extension API?

Post by I1066 »

Yeah, I know about the LUA scripting support, but it is not really the same thing as, for example, MEF.

MEF is more for extending the game, while LUA is for scenario design.

With MEF you could, for example, allow extensions to add commands to context menus, extend/modify the AI, integrate/communicate with external services and so on.

For example, you could with MEF create an extension that adds the possibility to move weapons and other resources between bases with aircraft with appropriate loadouts.
Dimitris
Posts: 15326
Joined: Sun Jul 31, 2005 10:29 am
Contact:

RE: Extension API?

Post by Dimitris »

Something similar to this is being worked on the professional version (http://www.warfaresims.com/?page_id=3822). If you have a specific need please contact us in private.

Thanks!
hawkeye_de
Posts: 51
Joined: Sun Apr 19, 2009 5:33 am

RE: Extension API?

Post by hawkeye_de »

So, you only make this available for government customers ? That's a pity :(
thewood1
Posts: 10097
Joined: Sun Nov 27, 2005 6:24 pm
Location: Boston

RE: Extension API?

Post by thewood1 »

What would you do with access to an SPI...just curious what ideas people had. I have seen several systems allow this, but no one ever does anything with it.
hawkeye_de
Posts: 51
Joined: Sun Apr 19, 2009 5:33 am

RE: Extension API?

Post by hawkeye_de »

the topic owner has given some examples: AI, altering the game engine...
But sure, only a minority would play with that, that's true

Probably the benefits of a complete moddable game are greater when you have a very large community like Civilization ...
mikmykWS
Posts: 7185
Joined: Tue Mar 22, 2005 4:34 pm

RE: Extension API?

Post by mikmykWS »

We need to see value in what we're doing as every minute doing something else is stealing time from what is.

Show us value.

Thanks!

Mike
thewood1
Posts: 10097
Joined: Sun Nov 27, 2005 6:24 pm
Location: Boston

RE: Extension API?

Post by thewood1 »

But can't you do his main example today with lua?
hawkeye_de
Posts: 51
Joined: Sun Apr 19, 2009 5:33 am

RE: Extension API?

Post by hawkeye_de »

you mean full control of the AI for instance ?

Now, you can't ... you would need to plug into the game/simulation loop and have full access to the object model (access to all units with 'all' of their properties)

GCBlue 2 ( unfortunately discontinued, open source now) https://github.com/gcblue/gcblue ) had such an approach(although it was not fully implemented)...you had access to the game loop via a python API...I've written a wiki page there how to attach a python debugger to the game...was quite fun...
hawkeye_de
Posts: 51
Joined: Sun Apr 19, 2009 5:33 am

RE: Extension API?

Post by hawkeye_de »

ORIGINAL: mikmyk

We need to see value in what we're doing as every minute doing something else is stealing time from what is.

Show us value.

Thanks!

Mike

Mike, my initial comment was just a reflex ;)...you're right, it would be a major effort for you and I would not make much use of it, since I'm occupied with my own project.

Maybe you could think about to evolve the Lua approach: So that it is somewhat closer integrated into the game loop (not every tick of course) so that a scen designer could control more aspects of the AI during 'runtime' and not only during 'design time'
thewood1
Posts: 10097
Joined: Sun Nov 27, 2005 6:24 pm
Location: Boston

RE: Extension API?

Post by thewood1 »

"was quite fun" for both people that did it.

No, I meant moving loadouts and aircraft around.
mikmykWS
Posts: 7185
Joined: Tue Mar 22, 2005 4:34 pm

RE: Extension API?

Post by mikmykWS »

ORIGINAL: hawkeye_de
ORIGINAL: mikmyk

We need to see value in what we're doing as every minute doing something else is stealing time from what is.

Show us value.

Thanks!

Mike

Mike, my initial comment was just a reflex ;)...you're right, it would be a major effort for you and I would not make much use of it, since I'm occupied with my own project.

Maybe you could think about to evolve the Lua approach: So that it is somewhat closer integrated into the game loop (not every tick of course) so that a scen designer could control more aspects of the AI during 'runtime' and not only during 'design time'

ok thanks
mikmykWS
Posts: 7185
Joined: Tue Mar 22, 2005 4:34 pm

RE: Extension API?

Post by mikmykWS »

ORIGINAL: thewood1

"was quite fun" for both people that did it.

No, I meant moving loadouts and aircraft around.

Exactly.[:)]

Mike
Post Reply

Return to “Mods and Scenarios”