Aller au contenu

Photo

Script to start as Rogue


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

#1
SvasK

SvasK
  • Members
  • 8 messages
Hello
can somebody tell me the Script to let the
Player start my own Module as "Standartrogue"?
I want no Character Creation for the Player....only start as Rogue
with all the basic Equip and Skills.

thx

Modifié par SvasK, 04 décembre 2009 - 04:51 .


#2
Sunjammer

Sunjammer
  • Members
  • 925 messages
The following is an extract from the LRRHR challenge module.  It bypasses the normal character generation and forces the player to play as an elven mage.  It should be obvious enough how to change it to make the player start as a rogue:

#include "log_h"
#include "plot_h"
#include "utility_h"
#include "sys_chargen_h"
#include "sys_rewards_h"

void main()
{
    event ev = GetCurrentEvent();
    object oHero = GetHero();

    switch(GetEventType(ev))
    {
        ////////////////////////////////////////////////////////////////////////
        // Sent by: The engine
        // When: The module starts. This can happen only once for a single
        //       game instance.
        ////////////////////////////////////////////////////////////////////////
        case EVENT_TYPE_MODULE_START:
        {

            // skip character generation
            Chargen_InitializeCharacter(oHero);

            // create a female, elf, wizard
            SetName(oHero, "Elissanna");
            Chargen_SelectGender(oHero, GENDER_FEMALE);
            Chargen_SelectRace(oHero, RACE_ELF);
            Chargen_SelectCoreclass(oHero, class_WIZARD);
            Chargen_SelectBackground(oHero, BACKGROUND_MAGI);
            AS_AddclassLevels(oHero, class_WIZARD, 1);

            // give the player some equipment
            EquipItem(oHero, UT_AddItemToInventory(R"magestaff.uti"));
            EquipItem(oHero, UT_AddItemToInventory(R"playerclothing.uti"));

            // select some spell for the player
            _AddAbility(oHero, ABILITY_SPELL_ARCANE_BOLT);
            _AddAbility(oHero, ABILITY_SPELL_WINTERS_GRASP);
            _AddAbility(oHero, ABILITY_SPELL_LIGHTNING);

            break;
        }
    }

    // call core module event handler
    HandleEvent(ev, R"module_core.ncs");
}

Modifié par Sunjammer, 28 novembre 2009 - 06:54 .


#3
Lord Thing

Lord Thing
  • Members
  • 257 messages
If you want the player to be able to change everything but the fact that they're a rogue, you can also override the "Playerclass" column in CLA_Base to 0 for both warrior and mage, I haven't checked how this effects party members yet though, so use with caution.



See here for how to override 2DAs if you need help.

#4
EJ42

EJ42
  • Members
  • 723 messages
Why not start as Mascara or Lipstick?