plugin framework     (Moderator: BAH_Strike) Previous Topic | Next Topic
Page 1 of 1
Post 23-Dec-2018 19:34        

working on support for allowing C programmers to develop core smith engine mods (DLLs)

API sneak peak!

   // it simply just makes sense to allow plugins to freely execute cog;  this means you can do all sorts of crazy stuff in-game
   // without having to learn a new API and without me having to write one.
   // note that the cog script should NOT include a symbols section, nor  code / end  keywords.
   // you are responsible for providing the source/sender and params.  your cog script can use the typical
   // GetSourceRef(),  GetSenderID(), GetParam(0)  etc  to retrieve these values.
   // if your cog calls ReturnEx(), this value will be accessible to you via the returned szReturn  value.
   // final note: the smith cog VM operates under a Flex symbol type and generally is most compatible as strings.
   // so for simplicity of interface, all values are strings. you are responsible for formatting integer values into strings
   // and parsing return values etc.
   typedef void (__cdecl *dExecuteCOG)(const char* szCOGScript, const char* szSourceRef, const char* szSenderRef, const char* szSenderID, const char* szParam0, const char* szParam1, const char* szParam2, const char* szParam3, char* szReturn);


// called by smith whenever it is ready to execute a cog verb.  mods get first dibs.
// returning 1 indicates to smith that the verb was handled and it will not be passed to any other
// plugins or handled by smith itself.  returning 0 allows the verb to continue until its hopefully picked up by something else.
// note: verb name in szName is always lowercase
//int __cdecl OnExecuteCOGVerb(const char* szName, int nNumParams, const char** pszParams, char* szReturn)
Post 31-May-2019 02:08        

ya i forgot to paste that actual URL to the opensource project

sm sith lord and i worked for a whole weekend and we were able to get a full feature film to stream to an in-game JK texture, through this API

sorry, the movie stream thing is sith lords: check out anarchyarcade.
the opensource module i share is capable of streaming *.smk cutscenes to a texture
*** Post commands are unavailable for guests. ***