Aller au contenu

Photo

Adding script blocks


  • Veuillez vous connecter pour répondre
6 réponses à ce sujet

#1
Shaun the Crazy One

Shaun the Crazy One
  • Members
  • 183 messages
Back on the origenal NWN2 forums we could post script block using the code comand.  This was utterly essential to the scripting forum.  Is this comand or a similar one avalible in the forum?

update: apparently the code ( in [ ] ) comand still works, altbhough it displays a bit differntly.

Modifié par Shaun the Crazy One, 13 juillet 2010 - 10:11 .


#2
Selene Moonsong

Selene Moonsong
  • Members
  • 3 390 messages
Test...



Posted as an example from my own module

//
// Spawn ObjectEffect
//
int ParseFlagValue(string sName, string sFlag, int nDigits, int nDefault);
int ParseSubFlagValue(string sName, string sFlag, int nDigits, string sSubFlag, int nSubDigits, int nDefault);
object GetChildByTag(object oSpawn, string sChildTag);
object GetChildByNumber(object oSpawn, int nChildNum);
object GetSpawnByID(int nSpawnID);
void DeactivateSpawn(object oSpawn);
void DeactivateSpawnsByTag(string sSpawnTag);
void DeactivateAllSpawns();
void DespawnChildren(object oSpawn);
void DespawnChildrenByTag(object oSpawn, string sSpawnTag);
//
//
effect ObjectEffect(object oSpawn)
{
    // Initialize Variables
    effect eObjectEffect;
    // Initialize Values
    int nObjectEffect = GetLocalInt(oSpawn, "f_ObjectEffect");
//
// Only Make Modifications Between These Lines
// -------------------------------------------

    // ObjectEffect 00
    // Dummy ObjectEffect - Never Use
    if (nObjectEffect == 0)
    {
        return eObjectEffect;
    }
    //
    // Bard's Song
    if (nObjectEffect == 1)
    {
        eObjectEffect = EffectVisualEffect(VFX_DUR_BARD_SONG);
    }
    //

// -------------------------------------------
// Only Make Modifications Between These Lines
//
    // Return the ObjectEffect
    return eObjectEffect;
}
/*
*/

It seems to work okay, it just works a bit differently from what we are used to on the BioBoards forums is all.

Modifié par Selene Moonsong, 13 juillet 2010 - 11:11 .


#3
MokahTGS

MokahTGS
  • Members
  • 946 messages
Ug...I like the old version better....maybe they will upgrade it eventually...

#4
Shaun the Crazy One

Shaun the Crazy One
  • Members
  • 183 messages

MokahTGS wrote...

Ug...I like the old version better....maybe they will upgrade it eventually...


Agreed this new version takes up too much space with large scripts and doesn't make it clear where the ordinary text ends and the script begeins.

#5
Selene Moonsong

Selene Moonsong
  • Members
  • 3 390 messages
Definately not as elegant as the BioBoards design, I rather prefer the small fixed box and the link to open in a separate full-view broser window, but it is serviceable.

#6
Sunjammer

Sunjammer
  • Members
  • 925 messages

MokahTGS wrote...

Ug...I like the old version better....maybe they will upgrade it eventually...

We raised it a year ago when we first started beta testing Social and a couple of months later but we're still waiting.  Fluffyameoba and I gave BioWare GeSHi definition files for nwscript and dascript respectively. These are currently used on the Dragon Age Toolset Wiki but they've never been picked up for the forum.

Perhaps the increased demand from the NWN and NWN2 communities will help. Jeff Rousell is the man you want to speak to.

Modifié par Sunjammer, 14 juillet 2010 - 11:57 .


#7
painofdungeoneternal

painofdungeoneternal
  • Members
  • 1 799 messages
hmm yes

Also fix list=A and list=1, when used they seem to start an indent but don't close the indent, everything thereafter ends up indented as well. ( the plain bullets don't have an issue ).

Example

This works fine
  • Works
  • Fine
Note that this line returns to the far left

This errs
  • Don't
  • Work
Indent is still increased

As does this
  • Don't
  • Work
which again increases indent. ( i set up new bbcodes myself, basically the same issue ). Note the closing ol shows up at the bottom of the entire post, not below the list like it does for the bullet list, very simple to fix, just make the regex like that and it should work.

Other than that, just get a basic CSS guy to get [code=auto:0] working even if you never get to nwscript and dascript.

Modifié par painofdungeoneternal, 14 juillet 2010 - 02:29 .