Author Topic: Changing PCs  (Read 734 times)

Legacy_ILikeToast

  • Newbie
  • *
  • Posts: 6
  • Karma: +0/-0
Changing PCs
« on: October 31, 2010, 09:59:23 pm »


                Hey, I've got a strange question. In my module, I want to force the player to play as a specific character. I've looked in several forums, and have yet to find an answer. How would I go about such an endeavor? Thank you all for your time! 
               
               

               
            

Legacy_Xenovant

  • Full Member
  • ***
  • Posts: 182
  • Karma: +0/-0
Changing PCs
« Reply #1 on: November 01, 2010, 02:50:28 am »


               I have never done it but I suposse that it could work: add a "tag" to the character with leto, and then, in the module create a script that checks the PC looking for that tag.



 Other way is using the "GetName" function but you could cheat the module using a different character with only the same name '<img'>
               
               

               
            

Legacy_ILikeToast

  • Newbie
  • *
  • Posts: 6
  • Karma: +0/-0
Changing PCs
« Reply #2 on: November 01, 2010, 04:35:14 am »


               I'm not sure I understand, as I am a bit of a noob. Could you please go into more detail?
               
               

               
            

Legacy_Xenovant

  • Full Member
  • ***
  • Posts: 182
  • Karma: +0/-0
Changing PCs
« Reply #3 on: November 01, 2010, 02:44:41 pm »


                 You can download Leto here

  Open the advanced editor (Menu>Tools>Advanced editor). Open your character rightclicking in the opened window and selecting "open file". Edit the tag field writing whatever  you want and save (rightclick>save file).

  In the module check for that tag. Here is an example script for a conversation:


void main()
{
object oPC = GetPCSpeaker();

 if (GetTag(oPC) == "THE_TAG_OF_THE_PC")
  {
  //the character is the right one, put here your code (an "ActionJumpToLocation" for ex.) 
  }

 else
  {
  SpeakString("Your character is invalid");
  }

}
               
               

               


                     Modifié par Xenovant, 01 novembre 2010 - 02:58 .
                     
                  


            

Legacy_Cain Maris

  • Newbie
  • *
  • Posts: 45
  • Karma: +0/-0
Changing PCs
« Reply #4 on: November 08, 2010, 03:54:33 am »


               There are some pointers to examples at the bottom of this post. The rest is my advice on how to use your time productively, which you can freely ignore.

You can do it in two easy steps, which will save you all the time needed to script in checks and restrictions:
  • Set up all of the conversations, plot and such with reference to

     the PC you provide.
  • Tell people: "This mod is intended to

    be played with the provided character. If you don't then the

    conversations will be odd, the plot won't make sense, and I'll be sad

    because you've Traduced my Art."

Unless you're hosting it on your own server, that's about as
much control as you can realistically get with any mechanism.
  • You're

    releasing a mod to a gaming community that has the same tool set you do.
  • Any controls and restrictions you script in are going to serve as a

     challenge to stubborn people like me who don't like being told how to

    play their game.
  • If you want total control over the player experience,

     this may not be the best medium for that.
To my mind, you're better off explaining why you set it up the way you
did, and leaving people to either take your advice or screw up their own
experience if they insist. That will free up time and creative energy
you can use elsewhere in creating your mod.

Unless you're doing this as an exercise in learning to script, in which case never mind everything I just said.

Xenovant's advice looks workable to me - although most of my scripting experience comes from subverting them - and you can also take a look how they did it in these mods, which are all designed to play with the included character:
               
               

               


                     Modifié par Cain Maris, 08 novembre 2010 - 03:55 .
                     
                  


            

Legacy_Melkior_King

  • Full Member
  • ***
  • Posts: 234
  • Karma: +0/-0
Changing PCs
« Reply #5 on: November 08, 2010, 11:39:34 pm »


               The game has no direct way of forcing a player to use a particular starting "build" and no direct way of forcing a player to follow a particular build during level-up.



The only way to achieve this would be by scripting.  For the starting build, you'd need to make the player appear in a starting area with a NPC or sign to explain what build they must use in order to be allowed out of the starting area and into the game.  Only allow toons out of the starting area and into the game if their build stats are valid.



For level-up, you'd need a script which would check the player's current build characteristics and force the player to re-level if they had taken a banned class or banned skill for the character type you're trying to force them into making.



It's my opinion (for what it's worth) that what you're trying to do is more trouble than it's worth and will drive players away from your module rather than attracting them to it.
               
               

               
            

Legacy_Eat2surf

  • Newbie
  • *
  • Posts: 19
  • Karma: +0/-0
Changing PCs
« Reply #6 on: November 12, 2010, 03:06:36 am »


               I've forced PC to have their appearance changed to match the proper character... but the name and build is whatever the player brought in.. but the appearance looks right.. and the player still gets to have the feel of playing a unique PC .. *shrugs* Maybe I should finish "Treasure Island" so my script can be seen.. lol
               
               

               
            

Legacy_Mudeye

  • Full Member
  • ***
  • Posts: 238
  • Karma: +0/-0
Changing PCs
« Reply #7 on: November 18, 2010, 03:42:33 pm »


               This is a weird idea but could you make the module with a game save that has the correct PC. That way people just load and play the save since it already has the PC that you want.
               
               

               
            

Legacy_CheeseshireCat

  • Jr. Member
  • **
  • Posts: 79
  • Karma: +0/-0
Changing PCs
« Reply #8 on: November 18, 2010, 07:57:59 pm »


               When reading the question, I thought of a completely different reason. A single-player "hotseat" story where PC characters swap for the different parts of it. Something like Fahrenheit/Indigo Prohecy.