Guides and info

  • The scripting I am used to doing/did do for some personal mods in Bioware's Neverwinter Nights game, was (I think), a customised C++ using their very powerful NWN Toolset.


    Soooo.....Just to kind of get it clear in my own head about the type of programming involved for PSWG, this is an example of a piece of code I wrote to do with creating a characters ability to fly or jump according to certain things in the game environment. (this type of scripting is something I find relatively easy to get my head around) does this seem *similar* to the programming that would be needed here?



    void main()
    {
    object oPC = OBJECT_SELF;
    object oArea = GetArea(oPC);
    location lLoc = GetSpellTargetLocation();
    if (GetCreatureWingType(oPC) != CREATURE_WING_TYPE_NONE && GetIsAreaAboveGround(oArea) == TRUE)
    {
    SendMessageToPC(oPC, "flight mode");
    //location lLoc = GetSpellTargetLocation();
    effect eFly = EffectDisappearAppear(lLoc);
    ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eFly, oPC, 2.5);
    }
    if(GetIsAreaInterior(oArea) == TRUE)
    {
    // location lLoc = GetSpellTargetLocation();
    location lStart = GetLocation(oPC);
    vector vSelf = GetPositionFromLocation(lStart);
    vector vTarget = GetPositionFromLocation(lLoc);
    int nLos = LineOfSightVector(vSelf,vTarget); // if the pc has a clear line of sight to the flight location
    float fJump = GetDistanceBetweenLocations(lStart, lLoc); // the distance of the attempted jump/flight assisted jump
    //
    if(nLos == TRUE && fJump <= 3.00)// pc makes a short distance jump (later will work on this according to class type)
    {
    SendMessageToPC(oPC, "Jump mode");
    effect eFly = EffectDisappearAppear(lLoc);
    ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eFly, oPC, 2.5);
    }
    else if(nLos == TRUE && fJump > 3.00)// the pc can see where they want to go but the distance is greater than 3 m
    {
    if (GetCreatureWingType(oPC) != CREATURE_WING_TYPE_NONE ) //the pc has wings so can make longer flight assisted jumps
    {
    // make a check now for flight barriers (so that you can't fly through placeables/doors etc)
    object oObject = GetNearestObjectToLocation(OBJECT_TYPE_PLACEABLE, lLoc);
    location lObject = GetLocation(oObject);
    float fDist = GetDistanceBetweenLocations(lLoc, lObject);
    if(fDist <= 4.00) // if the nearest placeable is 4 m away or less cannot fly (to stop an exploit where you can jump to impossible locations)
    {
    SendMessageToPC(oPC, "I cannot successfully jump nor fly to there");
    }
    else
    {
    SendMessageToPC(oPC, "Flght mode");
    effect eFly = EffectDisappearAppear(lLoc);
    ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eFly, oPC, 2.5);
    }
    }
    else
    {
    SendMessageToPC(oPC, "Too far"); // the pc has no wings and its too far to jump
    }
    }
    //
    else if(nLos == FALSE)
    {
    SendMessageToPC(oPC, "I can't see a way");
    }
    }
    }




    I am one with the force the force is with me   ~ Chirrut Imwe, Baze Malbus

  • I would recommend just downloading the holocore files and opening them in eclipse. Once you have a look at some of the work that has been done it will give you a better feel of how things are wrote here.

  • That sounds like some great progress! It'll give myself and others without much programming knowledge a way to contribute, and if I ever get around to learning code, I would love to contribute.

    Formerly known as Camer from Intrepid, and later from Starsider

  • I'm interested in development, as I would like to work on a side project. What would be the best way for me to familiarize myself with the codebase? I'm already decently proficient in Java/OOP in general and will be becoming a full time software developer within the year or so.

  • I'm interested in development, as I would like to work on a side project. What would be the best way for me to familiarize myself with the codebase? I'm already decently proficient in Java/OOP in general and will be becoming a full time software developer within the year or so.

    Unfortunately all the information about the codebase hasn't been reposted.


    Your best bet is to get on the dev chat with the rest of us and ask away. I can't invite you, so someone else will have to.


    We are all students as well :thumbsup:

  • Unfortunately all the information about the codebase hasn't been reposted.
    Your best bet is to get on the dev chat with the rest of us and ask away. I can't invite you, so someone else will have to.


    We are all students as well :thumbsup:

    Haha, I would definitely be interested in the chat!

  • Haha, I would definitely be interested in the chat!

    A chat administrator says that they have sent you an invitation. Have you received anything?