A byte that travels

The best and quickest support by a group of top-notch editing specialists, guaranteed!

Moderator: Forum Guards

A byte that travels

Postby DxPlayer » Tue Jan 25, 11 8:25 pm

Hello there!
I'm trying to make my own portrait system for DX single player, it works like that:

Player chooses his portrait and starts a new game, so Skin Number is equals the Portrait Number:

DRMenuNewGameScreen
Code: Select all
function SaveSettings()
{
   local DRHuman player;
        (...)
   player.DRSkinNumber = portraitIndex;
}


It was suppose to Skin Number still the same as Portrait Index, but it just resets when player travels to Start Map!

Here:

DRHuman
Code: Select all
var travel byte DRSkinNumber;

event TravelPostAccept()
{
   local DeusExLevelInfo info;
   
   Super.TravelPostAccept();
      
      if (DRSkinNumber == 0)
   {
   }
      if (DRSkinNumber == 1)
   {
   }
      if (DRSkinNumber == 2)
   {
   }
      if (DRSkinNumber == 3)
   {
   }
      if (DRSkinNumber == 4)
   {
   }
   CarcassShouldBe = DRSkinNumber;
}


It works fine while in the MenuNewGameScreen menu but after the game starts the value is reseted.

How can I fix that?

EDIT:
It seens it does not work in MenuGameScreen:

Code: Select all
PORTRAIT INDEX VALUE:2
ScriptWarning: DRMenuScreenNewGame DX.DRHuman0.DeusExRootWindow0.DRMenuScreenNewGame0 (Function Deranged.DRMenuScreenNewGame.SaveSettings:001E) Accessed None
ScriptWarning: DRMenuScreenNewGame DX.DRHuman0.DeusExRootWindow0.DRMenuScreenNewGame0 (Function Deranged.DRMenuScreenNewGame.SaveSettings:0026) Attempt to assigned variable through None
ScriptWarning: DRMenuScreenNewGame DX.DRHuman0.DeusExRootWindow0.DRMenuScreenNewGame0 (Function Deranged.DRMenuScreenNewGame.SaveSettings:0039) Accessed None
ScriptWarning: DRMenuScreenNewGame DX.DRHuman0.DeusExRootWindow0.DRMenuScreenNewGame0 (Function Deranged.DRMenuScreenNewGame.SaveSettings:0041) Attempt to assigned variable through None
ScriptWarning: DRMenuScreenNewGame DX.DRHuman0.DeusExRootWindow0.DRMenuScreenNewGame0 (Function Deranged.DRMenuScreenNewGame.SaveSettings:004E) Accessed None
ScriptWarning: DRMenuScreenNewGame DX.DRHuman0.DeusExRootWindow0.DRMenuScreenNewGame0 (Function Deranged.DRMenuScreenNewGame.SaveSettings:0056) Attempt to assigned variable through None
ScriptWarning: DRMenuScreenNewGame DX.DRHuman0.DeusExRootWindow0.DRMenuScreenNewGame0 (Function Deranged.DRMenuScreenNewGame.SaveSettings:006B) Accessed None
PLAYERSKIN VALUE:0
Last edited by DxPlayer on Tue Jan 25, 11 8:47 pm, edited 5 times in total.
User avatar
DxPlayer
Regular
 
Posts: 488
Joined: Sun Jan 25, 09 6:31 pm
Location: Brazil

Postby DxPlayer » Wed Jan 26, 11 1:28 am

Problem solved!

I found my mistake while looking at Deus Ex menus hierarchy:


Code: Select all

function SaveSettings()
{
   local DRHuman player;
   player = DRHuman(root.parentPawn); //Forgot this line!
        (...)
   player.DRSkinNumber = portraitIndex;
}


Now it works fine!

Code: Select all
PORTRAIT INDEX VALUE:4
PLAYERSKIN VALUE:4
Last edited by DxPlayer on Wed Jan 26, 11 1:32 am, edited 3 times in total.
User avatar
DxPlayer
Regular
 
Posts: 488
Joined: Sun Jan 25, 09 6:31 pm
Location: Brazil

Postby ~DJ~ » Wed Jan 26, 11 6:38 am

awesome! :oops:

so.. this mod, can we has extra info on it? :$
User avatar
~DJ~
Forum Super Hero
 
Posts: 3766
Joined: Tue May 22, 07 12:23 pm

Postby DxPlayer » Wed Jan 26, 11 5:29 pm

It's Deranged mod:

In the summer of 2056 earth was assaulted by a highly evolved species of extra-terrestials. Huge fleets of advanced technology hung ominous above the continents of our world. Enormous blasts erupted from their warships incinerating all that was consumed by it's brilliant light. While the human race was still puzzling with the identity and goals of their attacker whole cities were laid to ashes. Amidst the chaos and devastation the troops of the aliens appeared on earth like hungry vultures casting themselves on a nearly dead beast. They had come to do the ground work, killing everyone in their path. They probably expected to finish the job quickly but the human race fought back. Some countries managed to take out a few of the alien vessels with nuclear cruise missiles and stealth-fighters, and the aliens withdrew their spaceships from earth's atmosphere. From there, in the cold darkness of space, the extra-terrestials launched a series of ruthless attacks using their teleportation technology. Two months later over 5 billion people had died in this war, and the aliens still hadn't made a single demand, or offered anything that could be regarded as an explanation for this bloodshed.


We do not know when are we releasing the first part (the original plan is to release it in April), but so far we have made great progress. The maps just need a few editing now, great part of the art is already done, we already programmed the custom .exe (which will launch a window with options and other effects) and the most important parts of Deranged.u are already coded.

We are in need for a weapon mod, since we are just 2 guys developing it and none of us know how to work in 3d model programs. Anyone who can help us is invited (pm contact)! :oops:

http://www.moddb.com/mods/deranged (the logo there is old, we already have a new one).
Last edited by DxPlayer on Wed Jan 26, 11 5:31 pm, edited 1 time in total.
User avatar
DxPlayer
Regular
 
Posts: 488
Joined: Sun Jan 25, 09 6:31 pm
Location: Brazil


Return to Editing issues

Who is online

Users browsing this forum: No registered users and 42 guests