Thread: How does one go about creating a custom NPC or weapon that acts like the original?

Results 1 to 6 of 6
  1. #1
    Registered User
    Join Date
    Dec 2016
    Posts
    29

    How does one go about creating a custom NPC or weapon that acts like the original?

    I compared the AngleScript code of a custom MP5 to the C++ code of the original MP5, and there are clear differences in syntax and structure, that make it very difficult for most users to create these custom entities. However, it would be the easiest way for novices to fiddle with AS. If only there was an easy way to convert those original entities from C++ to AS.
    Sven Co-op's AngelScript documentation is no longer available on GitHub, so right now it is extra difficult to begin doing anything with AS.

    How does one go about creating a custom NPC or weapon that acts like the original? How does the syntax/structure conversion process work?

  2. #2
    200 MB Angelscript log file KernCore's Avatar
    Join Date
    Apr 2016
    Location
    Brazil
    Posts
    269

    Re: How does one go about creating a custom NPC or weapon that acts like the original

    Documentation is available here: https://github.com/baso88/SC_AngelScript/wiki
    Take a look at some weapons, HLSP weapons and They Hunger weapons might give you a starting place

  3. #3
    Registered User
    Join Date
    Dec 2016
    Posts
    29

    Re: How does one go about creating a custom NPC or weapon that acts like the original

    Can a script replace only a few methods in a weapon's or NPC's code, or does the script have to have the entire logic of the entity?

  4. #4
    200 MB Angelscript log file KernCore's Avatar
    Join Date
    Apr 2016
    Location
    Brazil
    Posts
    269

    Re: How does one go about creating a custom NPC or weapon that acts like the original

    Quote Originally Posted by pekhe View Post
    Can a script replace only a few methods in a weapon's or NPC's code, or does the script have to have the entire logic of the entity?
    Unfortunately nope

  5. #5
    Registered User
    Join Date
    Dec 2016
    Posts
    29

    Re: How does one go about creating a custom NPC or weapon that acts like the original

    If that's the case, I assume that nothing in the game code can be replaced; only duplicate and make one's own version.

    For example: It's not possible to make changes to the grenade that a monster_human_grunt throws. You'd have to create a completely new human_grunt along with the custom grenade. Am I correct on this? This sets huge limits to what AngelScript can do in SC.

  6. #6
    func_vehicle enthusiaist w00tguy123's Avatar
    Join Date
    Dec 2006
    Location
    U.S. West
    Posts
    1,596

    Re: How does one go about creating a custom NPC or weapon that acts like the original

    You can try weapon_custom if you just want to modify the existing weapons.

    I think custom monsters are too much work at the moment. Even a simple zombie won't work correctly if you inherit from the default AI (no flinching or feeding IIRC).
    Love,
    w00tguy

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •