HeroEngine Forums
Welcome, Guest. Please login or Register for HeroCloud Account.

Author Topic: Changing the appearance of character select/creation area  (Read 1556 times)

Prometheus2012

  • General Accounts
  • *
  • Posts: 660
    • View Profile
    • Exile-Online

Any idea how to change the appearance of the character selection/creation area?

We cant even get the character model to show.

I want to add some models and a lab looking room in there so when the player logs in they will see the room and their character and the character select/create GUI stuff (which we alredy have) and then they can choose their character and press play to enter the world.

Thazager

  • General Accounts
  • *
  • Posts: 1144
  • Never stop learning
    • View Profile
    • Heroes and Villains MMORPG
Re: Changing the appearance of character select/creation area
« Reply #1 on: Jun 18, 17, 02:15:11 PM »

In one game, we have a nearly full creation area working. The selection area is where most of the actions (like log in, delete) take place, but we could not get anything to show there. We tried moving the select area functions to the create area with little luck, the select and log in worked, but not the function to delete.

In the other game, we had a stage character showing using the base female model (supplied by HE), but when we changed the model, the stage character stopped working, and wont show the new model.
Logged

nocake

  • General Accounts
  • *
  • Posts: 404
    • View Profile
    • BlightMMO
Re: Changing the appearance of character select/creation area
« Reply #2 on: Jun 18, 17, 03:43:19 PM »

I did this a couple years ago.

It was really simple.

First just find the creation area and then edit it how you see fit.
Then IIRC you just update the character string in this function:
HE_CCSUseCharacterSpecificationForVisibleCharacter


This is just a quick write up but I dont think there is anything else to do.

You can log into my world and check out my scripts if you wish.

« Last Edit: Jun 18, 17, 04:00:21 PM by nocake »
Logged

Thazager

  • General Accounts
  • *
  • Posts: 1144
  • Never stop learning
    • View Profile
    • Heroes and Villains MMORPG
Re: Changing the appearance of character select/creation area
« Reply #3 on: Jun 19, 17, 10:53:05 PM »

Yes, we have that part in.

  characterSpecification = "Commando_Male_01"

its also required to register that model in HE_CCSOnSpinUpRegisterCharacterSpecifications for the Create section.

  RegisterNPCSpec( "Commando_Male_01" )

When going to the Create area, sometimes the character shows on screen good as intended, sometimes its a mess on the floor. This seems to happen as the data is not yet loaded.   Switching chars by selecting ranger or wizard will eventually load the char, though getting it to show properly at start is not yet happening.
Logged

Thazager

  • General Accounts
  • *
  • Posts: 1144
  • Never stop learning
    • View Profile
    • Heroes and Villains MMORPG
Re: Changing the appearance of character select/creation area
« Reply #4 on: Jun 21, 17, 10:39:38 PM »

Looking thru some HJ_ref scripts and functions I found a few, that when used in our game, did not quite work. I am trying to find out why using println() functions.

Here is the code from HJ_ref, server side script name - playerutils (no class for script)
"thisPlayer" is a noderef, it has no class        How can it be compared to _PlayerCharacter ?
giving the value of assoc.target does not give it the class


Code: [Select]
untrusted function receiveRequestForVisibleCharacter(rci as Class RemoteCallClientIn)
  var playerName = rci.args["name"]
  var playerAssociations = QueryAssociation(me, "AccountCharacterAssociation", 0)
  thisPlayer as NodeRef
  vc as NodeRef of Class _characterAppearance
  foreach assoc in playerAssociations
    thisPlayer = assoc.target
    if thisPlayer <> None
      where thisPlayer is kindof _PlayerCharacter
        if thisPlayer.name == playerName
          vc = getMyVisibleCharacter(thisPlayer)
          break
        .
      .
    .
  .
 
  if vc != None
    data as List of String
    add back "CharacterSelection" to data
    add back playerName to data
    if $NPC._IsValidCharacterSpecification( vc._characterSpecification )
      fqn as String = $REPOSITORY._GetCharacterSpecificationPath( vc._characterSpecification ) + vc._characterSpecification + ".dat"
      add back fqn to data
      where thisPlayer is kindof HJcharacter_class
        add back thisPlayer.portraitFQN to data
      .
      SendCharacterOutfitToPlayer(me, vc, data)
    else
      refuseCharacterOutfitRequest(me, playerName)
    .
  .
.

I changed a few things to make it simpler (did that mess it up?) 
I tried to print out any classes that might be put on thisPlayer from giving it the value of assoc.target - none show
I commented out the portrait part, not having added it yet.

This is the error I get when it runs, the node ID is "thisPlayer". It errors when trying to get any classes, commenting out this check, It stops when checking to "is kind of _PlayerCharacter", and exits.

[hsl_error] 1,1: [Character Selection] SCRIPT ERROR: In function GetClassesOnNode: GOM::describeNode (11112): requested node ID (9223372112935021695) not found



Code: [Select]
untrusted function receiveRequestForVisibleCharacter(name as String)
  println("got call for "+name)
  var playerName = name
  var playerAssociations = QueryAssociation(me, "AccountCharacterAssociation", 0)

  thisPlayer as NodeRef
  vc as NodeRef of Class _characterAppearance

  foreach assoc in playerAssociations
    thisPlayer = assoc.target

    println("thisPlayer "+thisPlayer+"   account "+account)     // show some info
      class_list as List of String = GetClassesOnNode(thisPlayer)
      foreach val in class_list
        println("class found "+val)
      .

    if thisPlayer <> None
      where thisPlayer is kindof _PlayerCharacter
        println("thisPlayer name "+thisPlayer.name+"   name "+playerName)
        if thisPlayer.name == playerName
          vc = thisPlayer.GetMyVisibleCharacter()
          println("got  vc "+vc)
          break
        .
      .
    .
  .

  if vc != None
    println("starting to add data "+vc)
    data as List of String
    add back "CharacterSelection" to data
    add back playerName to data
    if $NPC._IsValidCharacterSpecification( vc._characterSpecification )
      fqn as String = $REPOSITORY._GetCharacterSpecificationPath( vc._characterSpecification ) + vc._characterSpecification + ".dat"
      add back fqn to data
//      where thisPlayer is kindof E_playerCharacter
//        add back thisPlayer.portraitFQN to data
//      .
      SendCharacterOutfitToPlayer(account, vc, data)
    else
      println("not good oufit for "+playerName)
//      refuseCharacterOutfitRequest(me, playerName)
    .
  .
.

How it works in HJ_ref, I don't know, when it looks like it should not.
« Last Edit: Jun 21, 17, 10:41:46 PM by Thazager »
Logged

GlorianLanTarini

  • General Accounts
  • *
  • Posts: 148
    • View Profile
Re: Changing the appearance of character select/creation area
« Reply #5 on: Jun 21, 17, 11:25:09 PM »

Hi, Prometheus.

There are several ways to achieve the result you needed.

First:
Create fullscreen Virtual Stage GUI, with lab and character, which will show at selection area.

Second:
Push and activate "Camera layer" on entering to CSS area (basically, it hasn't it), then create and activate the camera. After that, go to the editable instance of CSS area and create a lab. Then use "character outfit system" to show character.

Both ways are very complex and require much time and knowledge.

Write if you need additional help.

To Thazager:

What you write is part of the "character outfit system". It works not trivial. It took me a full day just to trace all of the scripts involved in this process.
Logged

Thazager

  • General Accounts
  • *
  • Posts: 1144
  • Never stop learning
    • View Profile
    • Heroes and Villains MMORPG
Re: Changing the appearance of character select/creation area
« Reply #6 on: Jun 22, 17, 11:41:47 AM »

Yes, it is kind of complex, I have been working with it for about a month (a week here and there). We have had it working with the base female char (given by Hero Engine), but when we changed models, it no longer worked, the character model does not seem to load the same way in order to get the data for an outfit.  Maybe its because the model is Static type and not Dynamic?

This is why I was looking at the HJ_ref scripts.
Logged

nocake

  • General Accounts
  • *
  • Posts: 404
    • View Profile
    • BlightMMO
Re: Changing the appearance of character select/creation area
« Reply #7 on: Jun 22, 17, 09:42:43 PM »

This sounds more like an asset load issue.

Lets clarify this problem a little more:
 " Switching chars by selecting ranger or wizard will eventually load the char, though getting it to show properly at start is not yet happening."

So the main problem is your character is not loading properly on the first load but when you reload it does load properly?

I dont have this issue since I only have one character.

I would suggest activating each character model via script on creation area load and then setting the character to the default character.

Another suggestion would to be looking into RegisterNPCSpec() and seeing exactly what is does. You might need to load the character somewhere else.

Is there any other problems you are currently encountering besides this? (sorry if i missed something)

Thazager

  • General Accounts
  • *
  • Posts: 1144
  • Never stop learning
    • View Profile
    • Heroes and Villains MMORPG
Re: Changing the appearance of character select/creation area
« Reply #8 on: Jun 22, 17, 11:16:59 PM »

In Create section:
Currently, I am not seeing the model load in badly (mess on floor). I have let the world sleep several times before and it did not seem to effect it. Though, now it seems to load good each time. (not sure why the change) Something in art different?

In Select section:
I have tried a few diff ways to show a character in stage window. With the base female (HE model) it works, with new model it does not.

"You might need to load the character somewhere else."
This might be why, will look into it.
Logged

Prometheus2012

  • General Accounts
  • *
  • Posts: 660
    • View Profile
    • Exile-Online
Re: Changing the appearance of character select/creation area
« Reply #9 on: Sep 08, 17, 08:53:01 AM »

We got the CHARACTER CREATION area changed in appearance. But was not able to effect how the CHARACTER SELECTION area looked. I cant even move around or place objects in there, even though the camera is unlocked. Will look into this at a later date.