moon
Peasant
Posts: 3
|
Post by moon on Oct 18, 2007 11:06:33 GMT
Hi
I was wondering if there is (or is going to be) a standard for creating plug-ins /add-ons to SIMTools. I am planning a rewrite of Shayan's Subrace Engine (either partly or fully) and I think SIMTool speech would make it a lot better.
~Moon
|
|
|
Post by FunkySwerve on Oct 23, 2007 21:32:19 GMT
There will probably be a custom command setup added in the near future - we're already using it on the servers.
Sorry for the slow response, I was gone hiking this weekend.
Best, Funky
|
|
moon
Peasant
Posts: 3
|
Post by moon on Oct 24, 2007 15:10:50 GMT
I am looking forward to it. ~Moon
|
|
|
Post by hunterdm on Nov 2, 2007 2:56:40 GMT
Oh, I am too now Moon and Funky! -drools-
|
|
moon
Peasant
Posts: 3
|
Post by moon on Dec 11, 2007 12:52:16 GMT
Hi again
Would it be possible to get a rough API or howto on how the "custom commands" would be added / how they work etc.. while we wait for the new release?
~Moon
|
|
|
Post by Acaos on Dec 11, 2007 15:01:38 GMT
Here's the way we do it on HG: In HandleCommands() in fky_chat_local, right after: SetLocalString(oCPC, "NWNX!CHAT!SUPRESS", "1");//suppress command speech no matter what, helps avoid circumvention of shout ban if (!GetIsDead(oCPC)) { sNormalCase = GetStringRight(sCText, GetStringLength(sCText) - 1); //preserve caps for setname command sCText = GetStringLowerCase(sNormalCase); //case insensitive add: SetLocalString(oCPC, "FKY_CHAT_LOCAL_CTEXT", sCText); SetLocalString(oCPC, "FKY_CHAT_LOCAL_CUPPER", sNormalCase); SetLocalObject(oCPC, "FKY_CHAT_LOCAL_CTARGET", oCTarget); ExecuteScript("fky_chat_local", oCPC); if ((sCText = GetLocalString(oCPC, "FKY_CHAT_LOCAL_CTEXT")) == "") // if the string was deleted, stop return; DeleteLocalString(oCPC, "FKY_CHAT_LOCAL_CTEXT"); DeleteLocalString(oCPC, "FKY_CHAT_LOCAL_CUPPER"); DeleteLocalObject(oCPC, "FKY_CHAT_LOCAL_CTARGET"); Then, in main() in fky_chat_dm_comm, right after SetLocalString(oDMPC, "NWNX!CHAT!SUPRESS", "1");//don't want commands to show in text sUppercase = GetStringRight(sDMText, GetStringLength(sDMText) - 3); sDMText = GetStringLowerCase(sUppercase); //case insensitive add: SetLocalString(oDMPC, "FKY_CHAT_LOCAL_DMTEXT", sDMText); SetLocalString(oDMPC, "FKY_CHAT_LOCAL_DMUPPER", sUppercase); SetLocalObject(oDMPC, "FKY_CHAT_LOCAL_DMTARGET", oDMTarget); ExecuteScript("fky_chat_dmlocal", oDMPC); if ((sDMText = GetLocalString(oDMPC, "FKY_CHAT_LOCAL_DMTEXT")) == "") // if the string was deleted, stop return; DeleteLocalString(oDMPC, "FKY_CHAT_LOCAL_DMTEXT"); DeleteLocalString(oDMPC, "FKY_CHAT_LOCAL_DMUPPER"); DeleteLocalObject(oDMPC, "FKY_CHAT_LOCAL_DMTARGET"); Then add two more scripts: fky_chat_local//::////////////////////////////////////////////////////////////////////////::// //:: SIMTools V3.0 Speech Integration & Management Tools Version 3.0 ::// //:: Created By: FunkySwerve ::// //:: Created On: April 4 2006 ::// //:: Last Updated: March 27 2007 ::// //:: With Thanks To: ::// //:: Dumbo - for his amazing plugin ::// //:: Virusman - for Linux versions, and for the reset plugin, and for ::// //:: his excellent events plugin, without which this update would not ::// //:: be possible ::// //:: Dazzle - for his script samples ::// //:: Butch - for the emote wand scripts ::// //:: The DMFI project - for the languages conversions and many of the emotes::// //:: Lanessar and the players of the Myth Drannor PW - for the new languages::// //:: The players and DMs of Higher Ground for their input and playtesting ::// //::////////////////////////////////////////////////////////////////////////:://
#include "aps_include" #include "fky_chat_inc"
void main() { object oCPC = OBJECT_SELF; string sCText = GetLocalString(oCPC, "FKY_CHAT_LOCAL_CTEXT"); int nText = FindSubString("a b c", GetStringLeft(sCText, 1));
switch (nText) {
case 0: break;
case 2: break;
case 4: break; } } and fky_chat_dmlocal: //::////////////////////////////////////////////////////////////////////////::// //:: SIMTools V3.0 Speech Integration & Management Tools Version 3.0 ::// //:: Created By: FunkySwerve ::// //:: Created On: April 4 2006 ::// //:: Last Updated: March 27 2007 ::// //:: With Thanks To: ::// //:: Dumbo - for his amazing plugin ::// //:: Virusman - for Linux versions, and for the reset plugin, and for ::// //:: his excellent events plugin, without which this update would not ::// //:: be possible ::// //:: Dazzle - for his script samples ::// //:: Butch - for the emote wand scripts ::// //:: The DMFI project - for the languages conversions and many of the emotes::// //:: Lanessar and the players of the Myth Drannor PW - for the new languages::// //:: The players and DMs of Higher Ground for their input and playtesting ::// //::////////////////////////////////////////////////////////////////////////:://
#include "aps_include" #include "fky_chat_inc"
void main() { object oDMPC = OBJECT_SELF; string sDMText = GetLocalString(oDMPC, "FKY_CHAT_LOCAL_DMTEXT"); int nText = FindSubString("a b c", GetStringLeft(sDMText, 1));
switch (nText) {
case 0: break;
case 2: break;
case 4: break; } } If you successfully execute a command, you'll need to delete FKY_CHAT_LOCAL_CTEXT or FKY_CHAT_LOCAL_DMTEXT from the issuer of the command, to tell SIMTools to stop processing. Unfortunately, this isn't really a plugin engine, but more of a way to add local commands to a mod without editing the SIMTools core. Acaos
|
|