[Logo]
 
  [Search] Search   [Recent Topics] Recent Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
Monster Points thoughts  XML
Forum Index -> Druids RPG Development
Author Message
BotFodder

Wicked Sick!
[Avatar]

Joined: 01/13/2006 15:23:41
Messages: 1239
Location: Florida
Offline

First, I'm 99% certain Engineers are going to have the same problem. I suspect the code from MPs was borrowed for EPs.

Here's my thoughts:

Somewhere along the line a spectator is getting the interaction for a Monster Master's MP indicator; either the Interaction is switching to the Spectator, or somehow the Spectator is getting the MonsterPointsInv object (I'd think the first one is more likely). I know from the M/MM's point of view, my MPs are no longer displaying properly after someone's spectated me (I see the bar but it's "frozen", doesn't change to indicate deaths or summons). Whether or not they see the bar change for monsters I summon I don't know quite yet - so far it's only the newbies that say anything when they get monster points.

I'm also hesitant to play with it too much without being able to fully test it. This is one of those things that if we ever got a test server up and running and could get a couple of us to toy with at the same time, we could arrange to kill and tweak as necessary to debug this issue. I wouldn't mind sharing with the developers (or another somewhat knowledgable individual) my server's address, but it doesn't run constantly. I'm also not sure I have a solid enough grasp of what's going on with the whole MonsterPointsInv and MonsterMasterInteraction (the two classes where I think the flaw is hiding). Finally, I've looked at Dru's code and it looks like he's got checks in the right places; there may be another place or two I'd put one, but I'd want to see logging info first to verify the existence of any problems.

Has anyone other than Dru (and I) looked at this code? If so, have you been able to grok it?

I use the Futurama Prof. Farnsworth Skin: http://www.disastrousconsequences.com/dcforum/posts/list/1595.page
WM: (DC)BotFodder 170
MM: (DC)BotDoctor 141
AM: (DC)BotBooster 147
http://ericdives.com/ - My DC Newbie FAQ: http://tinyurl.com/lz229
Twitter: http://twitter.com/ericdives
[WWW] aim icon [MSN]
TheDruidXpawX

Wicked Sick!
[Avatar]

Joined: 12/19/2004 18:32:13
Messages: 1946
Offline

If *anyone* has any idea why I even have to handle things differently from the way Mysterial works with the HUD and his RPG data, I'd love another solution. My current fix is really a hack, and I believe it may be related to the disappearing weapons and such.

Skin download: http://www.disastrousconsequences.com/dcforum/posts/list/1189.page

The fundamental problem is this: The first word we learn as children is NO. From that point forward society teaches women that saying no isn't polite, and society teaches men to respect those who wont take no for an answer.

The world is what you make of it, my friend. If it doesn't fit, you make alterations. -- Stella, The Morning Star
BotFodder

Wicked Sick!
[Avatar]

Joined: 01/13/2006 15:23:41
Messages: 1239
Location: Florida
Offline

The only thing that comes to mind right this second (and without a code review) is that Mysterial did something that everyone sees, IE, everyone gets one of their own interactions when they spawn.

Not everyone gets a monster points indicator.

It sounds dumb but not outside the realm of code sillyness.

I use the Futurama Prof. Farnsworth Skin: http://www.disastrousconsequences.com/dcforum/posts/list/1595.page
WM: (DC)BotFodder 170
MM: (DC)BotDoctor 141
AM: (DC)BotBooster 147
http://ericdives.com/ - My DC Newbie FAQ: http://tinyurl.com/lz229
Twitter: http://twitter.com/ericdives
[WWW] aim icon [MSN]
TheDruidXpawX

Wicked Sick!
[Avatar]

Joined: 12/19/2004 18:32:13
Messages: 1946
Offline

But you dont see someone's rpg hud when you spectate them... very strange.

Skin download: http://www.disastrousconsequences.com/dcforum/posts/list/1189.page

The fundamental problem is this: The first word we learn as children is NO. From that point forward society teaches women that saying no isn't polite, and society teaches men to respect those who wont take no for an answer.

The world is what you make of it, my friend. If it doesn't fit, you make alterations. -- Stella, The Morning Star
BotFodder

Wicked Sick!
[Avatar]

Joined: 01/13/2006 15:23:41
Messages: 1239
Location: Florida
Offline

I can't remember for sure but I don't see someone else's MP indicator when spectating them either.

Only after respawning after spectating them does anyone see it.

Or am I way off?

I use the Futurama Prof. Farnsworth Skin: http://www.disastrousconsequences.com/dcforum/posts/list/1595.page
WM: (DC)BotFodder 170
MM: (DC)BotDoctor 141
AM: (DC)BotBooster 147
http://ericdives.com/ - My DC Newbie FAQ: http://tinyurl.com/lz229
Twitter: http://twitter.com/ericdives
[WWW] aim icon [MSN]
BotFodder

Wicked Sick!
[Avatar]

Joined: 01/13/2006 15:23:41
Messages: 1239
Location: Florida
Offline

GOT IT! Fixed it in both MonsterMasterInteraction and EngineerInteraction.

It turns out that while a spectator can apparently detect the MonsterPointsInv object (and we might want to debug that - it shouldn't be happening), whatever MInv they're getting does not return an Owner (IOW, MInv.Owner returns None).

Hopefully this resolves the Monster/Engineer points indicator on non M/MMs, ENGs bug.

BTW, I had to bring home a laptop from work and throw UT2004 on it (no small feat - 6 cds, 230 MB or so of downloads just to get it up to speed, and then all the mods from the server ...)

I use the Futurama Prof. Farnsworth Skin: http://www.disastrousconsequences.com/dcforum/posts/list/1595.page
WM: (DC)BotFodder 170
MM: (DC)BotDoctor 141
AM: (DC)BotBooster 147
http://ericdives.com/ - My DC Newbie FAQ: http://tinyurl.com/lz229
Twitter: http://twitter.com/ericdives
[WWW] aim icon [MSN]
BotFodder

Wicked Sick!
[Avatar]

Joined: 01/13/2006 15:23:41
Messages: 1239
Location: Florida
Offline

BotFodder wrote:
... (and we might want to debug that - it shouldn't be happening) ... 

Okay I've learned a but about what gets replicated and what we might want to start including in certain replication statements ...

MonsterPointsInv is an extension of Inventory, which in turn is an extension of Engine.Actor. According to http://www4.ncsu.edu/~spcash/Unreal_Docs/ (which I got lucky and found via google one day - haven't gotten around to making my own undoc repository), Actor has the following replication statement:
Code:
 unreliable if ( (!bSkipActorPropertyReplication || bNetInitial) && (Role==ROLE_Authority)
 						&& bNetDirty && bNetOwner )
 			Owner, Inventory;

Now, ignoring for the moment that the Unreal Wiki says that all variables are reliable, I think the key here is that we don't have a bNetOwner value for the replication in MonsterPointsInv:
Code:
 replication
 {
 	reliable if (bNetDirty && Role == ROLE_Authority)
 		TotalMonsterPoints, UsedMonsterPoints;
 	reliable if (Role == ROLE_Authority)
 		RemoveInteraction;
 }

If I understand everything correctly (as I have observed the behavior), if you want something replicated to both spectators and the actual player, don't include bNetOwner. If you want it available to only the player, include bNetOwner.

Now, that's just what I'm thinking. Dru: Does that make sense to you? Should we go through a quickie review of the replications in DruidsRPG and make adjustments?

I use the Futurama Prof. Farnsworth Skin: http://www.disastrousconsequences.com/dcforum/posts/list/1595.page
WM: (DC)BotFodder 170
MM: (DC)BotDoctor 141
AM: (DC)BotBooster 147
http://ericdives.com/ - My DC Newbie FAQ: http://tinyurl.com/lz229
Twitter: http://twitter.com/ericdives
[WWW] aim icon [MSN]
TheDruidXpawX

Wicked Sick!
[Avatar]

Joined: 12/19/2004 18:32:13
Messages: 1946
Offline

It does sound sane to me.

I even wonder if there's a replicaiton option that is only relevant to the owner... I dont remember for sure at the moment.

Skin download: http://www.disastrousconsequences.com/dcforum/posts/list/1189.page

The fundamental problem is this: The first word we learn as children is NO. From that point forward society teaches women that saying no isn't polite, and society teaches men to respect those who wont take no for an answer.

The world is what you make of it, my friend. If it doesn't fit, you make alterations. -- Stella, The Morning Star
Szlat

Wicked Sick!

Joined: 05/18/2005 18:32:41
Messages: 2124
Location: UK
Offline

BotFodder wrote:
GOT IT! Fixed it in both MonsterMasterInteraction and EngineerInteraction.

It turns out that while a spectator can apparently detect the MonsterPointsInv object (and we might want to debug that - it shouldn't be happening), whatever MInv they're getting does not return an Owner (IOW, MInv.Owner returns None).

Hopefully this resolves the Monster/Engineer points indicator on non M/MMs, ENGs bug.
 

It certainly improves things.

I ran a test setup with the old code.
Dedicated server, two clients A monster master, B engineer. Let B die, and spectated A. When B respawned, he had a mixture of monster points and engineer points on HUD.
Tried same with new code. When B respawned it looked ok. Only Engineer points displayed

However, I put 2 lines of debug in the EngineerInteraction PostRender and 2 in the MonsterMasterInteraction PostRender. The first log was almost immediately on entering, the second when it draws the points on the screen.

With the old code, after the respawn, we were getting all four logs being generated in B's UT2004 log file.
With the new code, we were getting both Engineer logs as expected, but also the first Monster log.
So the change stops the screen getting rubbish on it, but we still had a MonsterMasterInteraction running on the Engineers HUD - it just wasn't drawing anything.
BotFodder

Wicked Sick!
[Avatar]

Joined: 01/13/2006 15:23:41
Messages: 1239
Location: Florida
Offline

Szlat wrote:
So the change stops the screen getting rubbish on it, but we still had a MonsterMasterInteraction running on the Engineers HUD - it just wasn't drawing anything. 

This makes some sense - Interactions are probably something spectators get copied to them from the person they're specating. One theory I haven't yet tested is if you tried spectating from first person - IE, spectate and hit F4, you'll probably see (with old code both MP/EP and) the spectated's XP ...

I use the Futurama Prof. Farnsworth Skin: http://www.disastrousconsequences.com/dcforum/posts/list/1595.page
WM: (DC)BotFodder 170
MM: (DC)BotDoctor 141
AM: (DC)BotBooster 147
http://ericdives.com/ - My DC Newbie FAQ: http://tinyurl.com/lz229
Twitter: http://twitter.com/ericdives
[WWW] aim icon [MSN]
BotFodder

Wicked Sick!
[Avatar]

Joined: 01/13/2006 15:23:41
Messages: 1239
Location: Florida
Offline

BotFodder wrote:
One theory I haven't yet tested is if you tried spectating from first person - IE, spectate and hit F4, you'll probably see (with old code both MP/EP and) the spectated's XP ... 

BTW, I was wrong here. Just goes to show it happens.

I can now only theorize that the only reason why former spectators don't see spectated's xp meter is because their own is drawn - or somewhere along the line Mysterial's interaction is properly reset (maybe in the Mut's ModifyPlayer?).

However, since we have at least a mostly working solution right now, and I'm bogged down in combos (been up really late two nights in a row now) I don't think I'll be concerning myself with this until well after the next build.

I use the Futurama Prof. Farnsworth Skin: http://www.disastrousconsequences.com/dcforum/posts/list/1595.page
WM: (DC)BotFodder 170
MM: (DC)BotDoctor 141
AM: (DC)BotBooster 147
http://ericdives.com/ - My DC Newbie FAQ: http://tinyurl.com/lz229
Twitter: http://twitter.com/ericdives
[WWW] aim icon [MSN]
 
Forum Index -> Druids RPG Development
Go to: