Modcraft - The community dedicated to quality WoW modding!

Wrath of the Lich King Modding => Serverside Modding => Topic started by: Krang Stonehoof on September 17, 2014, 01:48:40 pm

Title: [QUESTION] - WoD Garrisons
Post by: Krang Stonehoof on September 17, 2014, 01:48:40 pm
Greetings,

I have a question,
How do you think that are Garrisons made / coded?

I mean, every player has it's Garrison, with a personal name. How can that be handled?
And every player has a personal phase or something like that.

Is it possible to implement something like this on 3.3.5?

Thanks.
Title: Re: [QUESTION] - WoD Garrisons
Post by: stoneharry on September 17, 2014, 02:28:44 pm
Yes.  This would be one of the easier things to port.

The player object contains player unique information. Modify this class

The UI is lua/xml, backport it.

Making it instanced is simple in theory, the server controls who sees who, just have creatures with a field that states what player that belong to and only push them to that player. Same with objects. Don't push players to other players in that zone.

And so on. Simple programming challenge. Can't really make a tutorial for this.
Title: Re: [QUESTION] - WoD Garrisons
Post by: schlumpf on September 17, 2014, 02:48:15 pm
The actual implementation of garrisons has a shitload of in-client code. Hacking it together might be a ... hack. A huge one. But certainly, player-specific zones have been possible forever.
Title: Re: [QUESTION] - WoD Garrisons
Post by: Krang Stonehoof on September 17, 2014, 03:54:27 pm
Just saying that it's possible is not helping me that much to be honest.

I would like to hear atleast a single idea of how to, then I can easily get it, but just saying it's easy / possible doesn't help.
Title: Re: [QUESTION] - WoD Garrisons
Post by: stoneharry on September 17, 2014, 04:15:11 pm
Quote from: "Krang Stonehoof"
Just saying that it's possible is not helping me that much to be honest.

I would like to hear atleast a single idea of how to, then I can easily get it, but just saying it's easy / possible doesn't help.

I told you how. I even answered the 2 specific parts.

Can't program? Can't tell you how to do that.
Title: Re: [QUESTION] - WoD Garrisons
Post by: kojak488 on September 18, 2014, 01:53:58 am
Quote from: "Krang Stonehoof"
but just saying it's easy / possible doesn't help.

Well it's a damn good thing that Stoneharry didn't say just that, eh?
Title: Re: [QUESTION] - WoD Garrisons
Post by: Krang Stonehoof on September 18, 2014, 07:04:19 am
I'm talking actually about Schlump who just said it was possible forever, not about the help I got from Stoneharry, I really thank you, your post was really useful to be honest.

But it's not the first time I see a post from Schlump just saying it's easy / possible and that's all he got to say.
I'm sorry if you get me wrong, no offense, but a small idea could come in hand.
Title: Re: [QUESTION] - WoD Garrisons
Post by: Krang Stonehoof on September 18, 2014, 07:09:09 am
Well, "Just have creatures with a field that states what player that belong to and only push them to that player", can you explain that to me a bit? I don't know how that would be possible, to be honest.

And I said that thing about Schlump because Stoneharry said pretty much everything and he said it will be like a hack, like it won't work.
Title: Re: [QUESTION] - WoD Garrisons
Post by: Steff on September 18, 2014, 07:48:17 am
Why should schlumpf tell you again the same stuff stoneharry said?  He only added the point that is is possible for a long time and warned you that it can realy. Get hacky.

I dont see anythin negativ in this post.
Title: Re: [QUESTION] - WoD Garrisons
Post by: stoneharry on September 18, 2014, 07:02:59 pm
Quote from: "Krang Stonehoof"
Well, "Just have creatures with a field that states what player that belong to and only push them to that player", can you explain that to me a bit? I don't know how that would be possible, to be honest.

And I said that thing about Schlump because Stoneharry said pretty much everything and he said it will be like a hack, like it won't work.

Indeed, Schlumpf just added to what I said... It would be hacky to backport it.

The map system works via 'cells' which is like an area in a grid. Cells are activated and deactivated as players move around, and only a certain radius of cells are pushed to each player depending on their location.

You would modify it so that certain zones only push creatures to players where the creature belongs to the player.

One way to achieve this, which probably is not the best way, is to add a reference to the player's low GUID in the creature class that if filled will only be pushed when a player that matches that reference is requesting that cell.

The cell system is very complicated.
Title: Re: [QUESTION] - WoD Garrisons
Post by: deep6ixed on September 18, 2014, 08:09:06 pm
I think how I could see it working if the Garrison area was it's own map and the instance ID was somehow bound to the player id, so that that first time the player enters the area it would lock him into it.  

The only questions I would have are:

What happens if the player is online?  Would the instance remain loaded in memory? As this could be a huge drain on resources.

Would there be a way to flush unused instances out of the database as characters got deleted?  

If I knew more about c++ than the small amount I knew now, I could see this working out as guild housing.