Modding multiplayer lobbies

adding options/changing options?

Heyas

 

So after a frustrating couple of random games in which the opposing team gets 2 sednas or 2 rooks or whatever the hell, I'm wondering if it's possible to implement extra features such as forcing unique demigods per team via lua alone and whether this will be a mod just the host needs or if it's a mod all players would need.

 

I've looked over bman's mod and a few other mods to get started with modding demigod, but I'm just wondering if anyone has already looked into this.

 

As an aside, I've not done any modding since Myth 2:sb (if anyone here even knows of that game), but I've been programming for years.

 

Thx

3,555 views 14 replies
Reply #1 Top

It is possible. If you look at the lobby code you can see the remenants of a similar function. All players would have to have the mod, and it would be a nonUI mod. It really isn't worth the effort, if people have the mod, then they would already be amiable to preventing double ups.

Reply #2 Top

Ugh, I had an arem game today with myself as QoT with TB and LE against double oaks and a rook...

This mod would be very helpful. You could also make a mod that ensures that both sides get the same random teams.

Reply #3 Top

After some some brief looking around of the lua code (windows 7 search SUX), I found the functions that appear to handle assigning random heros in HeroUtil.lua, and it looks like they were trying to implement some sort of forcing of unique dg's, but then apparently gave up.. which doesn't really bode well..

 

Still, I think this mod would be pretty valuable to a lot of players so I'll continue looking into it.  I dunno what you mean by "It really isn't worth the effort, if people have the mod, then they would already be amiable to preventing double ups".  That's exactly why they would get the mod.  The types of games I'm talking about are where everyone in the lobby chooses random, and if everyone has the random dg fix, then everyone would be getting unique dg's.  No dual rooks, or all qot games..

Reply #4 Top

I doubt they stopped because of difficulty. I would just as soon assume time constraints or the feeling that it was unnecessary. I've written Java programs with that sort of complexity and I'm the worst programmer in the continental United States.

Reply #5 Top

but there would also be other requirements.

1. every team gets a general and with 4v4 and up two generals

2. the mod doesnt generate games with squishy teams against tank teams like, da, tb, qot against rook, beast, sedna

Reply #6 Top

But those are the most fun games, lol

Reply #7 Top

You could make it so that every team gets a tier 1, tier 2, and tier 3 with a conditional that prevents all assassin teams.

Reply #8 Top

This is getting less and less random, lol.

Reply #9 Top

I have an idea:

Have it assign the demigods 1 at a time. For example, start with Team 1, Player 1. Then Team 2, Player 1. Etc.

If Team 1, Player 1 has a General, Team 2, Player 1 will get 1 as well. Also, Team 1, Player 2 will receive an Assassin, etc. Naturally, also checking each time that your team does not already contain this DG.

This would maintain an even mix of assassins and generals while still remaining fully (pseudo)random.

Also, I believe anything involving not allowing certain DGs to go up against others ( such as strong v weak ) is both subjective, and kills the random nature a good deal. Just my personal opinion there though.

Reply #10 Top

I agree with the n generals per team requirement, but as for squishie teams?  I dunno about that, but it could be done by keeping track of which tier dg's are on what team like splitshadow/zechio mentioned.  That or give the squishy team to the 70%ers who are always all on the same team.. more of a challenge :P .  Either way, that's a bit more work, would definitly be a version 2 type thing.

 

Edit:

Now that I think about it, who am I to enforce which dg's are which tier?  There's plenty of mods out there that are trying to balance the game.  If someone wants to use this mod along with one of the balance mods to make it so that da,reg,qot vs rook,sed,ub is more balanced, so be it.  Unbalanced teams is something for another mod, this one is just focusing on the dual rook issue.

Reply #11 Top

Bollocks..

was searching through the forum for some answers to some other questions I had and found this thread.  Looks like mods are only executed ingame, thus modding anything else about the game (menu's etc).. more difficult than a simple mod atm.

 

That being said, I cant find documentation anywhere to confirm what Derog and morpheous said...

 

Have to do more reading up on whatever I can find I guess..

Reply #12 Top

but its possible to mod random dg choice. heroutil.lua

i personally dont know how the information about the choices is spreaded to the other players though. but thats just a little problem. you could use a function that randomizes based on common data. i just dont have the time to look into it.

Reply #13 Top

Well, where I left off I was at the point where I was pretty sure what needed to be changed to get unique randoms working, but I couldnt get anything outside of ingame changes to work.  I can make ultra boots of speed no prob, but simple test changes like changing default hero you start with when you join a game (instead of using the 'last used' dg) weren't working.

 

I was looking to try and add a function for adding and keeping track of random dg's in the for loop at line 1093 of  LobbyBase:HostLaunchGame in lobbybase.lua which I'm thinking would have made it a change that would only require the host to have the mod.  But I'm stuck trying to get simple changes to appear in the lobby menu.

Reply #14 Top

the lobby itself aint moddable but since the choice "random demigod" is evaluated on mapstart its ingame and can be modded.