since i'm getting abit of headway on this lua script stuff i thought i'd give it a shot and make a little program to help fortify my skills a bit. after a bit of thinking i thought of an interesting way to kill two birsts with one stone. Frogboy mentioned thinking of a way to detect premade games so that they can either be flagged or warned. i did my best to build a little lua script to do this but being so new to it i've only been able to come this far.
reason for this post is to see if anyone else out in the community is willing it help out with completeing the script so that someone like SD could simply impliment it into the system to draw stats from the servers to figure out premaded.
EDIT: Made a bunch of edits since i made a few break throughs...
Lua Script: PremadeDetection (EDITED)
Description:
this here is the best decription of what i'm trying to do, thank you alvaro202:
If your just interested in playing, than you can simply switch teams and distribute your forces and the 'flags' would go away, since you wouldn't be on the same team.
Script
print("\n Premade?"ifBillFred == trueor BillJim == truethen print("Premade")else print("nope")end
in this i made an example of a new game where Bill, Fred and Jim are all on the same team... after running the script it checks their last games (the tables at the top) and references their teammates. the outcome for this is:\
Have they played with Bill? Bill is Freds TeammateBill hasn't met JimPremade?Premade
so from this Bill and Fred would be tagged as premade teammates
conclusion
would really love to hear some imput from people on how this might come together as well as lua script that would actualy work. make sure u point out my mistakes and what they should be changed to (and why) so i can learn from this. at the very least if someone form SD or GPG can do this better feel free to take the idea and run with it.
still waiting to hear is anyone knows how to access the demigod stats.. and how i would access them with a lua script, so if u know anything about that let me know
Why is everyone hating teams so much, after all this is a team game. I wish people would start making their own teams, to play this game like it's supposed to instead of expecting that everyone plays with random people.
What Schobbo said.It's like the community is going after the competitive players with pitchfork and torches. We should embrace premades and instead promote DG as a teamgame. More clans, competitive teams and a more esport aproach to the whole thing.
And ofc have respect for those that wanna play PUG vs PUG and clearly name our games in the correct manner to avoid confusion/nobstomp.
This seems a bit silly, there are too many variables to consider and not everyone has the same definition of a "Premade Team". In the end, any team that plays together (= actually plays as a team...) and wins will be considered "premade", even if those players have never been playing together before.
Often times I'll play 4 to 5 games in a row with 4 or 6 oof the same players i've been playing with all day. Why? Because we all just out of the same game at the same time and there are slim pickins for custom games most of the time.
Does this mean that we're a premade... no, it just meants that we all want to play as quickly as possible (as i'm sure everyone else can agree with that)
The logic behind your 'script' design is flawed. Any hard coded method of analyzing data, then crunching numbers against it in an analytical way to create a false reality of whether people are premades are not will fail.
Your functionality should be more like:
When X players leave a game there stats are recorded.
When players join a new game, there most recent games with length GREATER than 5 min (this time can be changed) are brought up.
The script checks names and teams. If players have played on the same team in the LAST previous game with time exceeding 5 minutes, it flags the associated players in the game lobby.
What a script like this would do, is keep premades from continuously creating premade vs pug teams. It would also keep them from being able to reset the script code by simply remaking a game with them on different teams and then exiting, because only games that last more than 5 minutes would count. If a group of people play together on a team in 1 game and win, the next game they join together and are on the same team in the lobby, all associated players would be flaged with like, red names or something.
I don't know how the scripting language in this game opperates or how it can overlay on the UI. If it's not possible a simple SQL website with access to the stats on Demigod Players could create this functionality, and everyone could access it.
A properly made script will just allow new players in the match to see that you have continuosly played games together. If you and say 5 people are all playing back to back it wont matter, because you all wont care. But say you and 2 of your buddies keep rejoining the winning team, and 3 new pubbers join up, they may not want to fight the 3 of you.
exactly.. this is a perfect description for what i want this to do. all it would do is serve as a tool for filtering who have been playing consistantly on a team. if people don't want to play premades they can use this to check who is and isn't... however if you don't care or mind about premades then a simple OFF/ON button will solve that.
thank you alvaro202 for the script help... i'm going to go back and rething the script logic a bit and then repost my new idea in the OP. if u have more suggestions i would really apreciate the help
Interesting. Out of curiosity, Alien, have you been coding before LUA? I'm trying to get into it myself and am wondering if LUA is a good starter, or if I should work up from BASIC.
i'm in the same boat... started in lua about 2 weeks ago. i got book on C++ as well and have been browsing through that but it mostly looks the same. if you go HERE u can get a pretty good feel for using lua. still haven't got to how to create UI and non command prompt visuals but i'm pretty sure it uses another program (something like SDK or something)
best bet is to ask someone else, since i probably don't know what i'm talking about yet...
If your interested in coding I strongly suggest staying away from script languages for starting. Not because they are evil or bad, but because they don't develop the programming logic that you develop from coding in an object oriented programming language.
Every platform has a different language that it is generally coded in. Computers can be coded for in many different languages, but the general rule of thumb is C++ with openGL as your renderer. The 3d engine you use is determined by what type of game you are making. In the 2d world you can forgo engines and start coding with pictures being 'drawn' to a screen (this often also uses openGL, but without the need of a 3d engine).
For the IPhone, you should learn C sharp. It's a strange variation of C++ that I don't really understand. I also don't plan on coding for the IPhone
The G1 (T-mobile/google's Iphone) uses java to code for its android platform.
For a starting language C++ would give you the most robust resources to develop other skills from. Java is a great secondary language, as it is becoming more mainstream for computer games to be produced using java, especially for indie developers.
As far as LUA goes, it's a language that is used on top of a C++ program. I don't fully understand it's implementation (I have never coded a LUA script) but I believe the C++ code compiles the LUA script at run time, and interprets the information into a C++ functionality. Which means you can program the C++ code input to a LUA script and recieve an output from the script, or simply recieve input from a script that is run during runtime.
LUA has been used for tons of big games. Obviously demigod is 1 of them, but many original steam games used LUA to create multiple functionality. Counter Strike, Team Fortress, games like that.
Learning LUA will make modding other games that use LUA easier than learning a coding language will. It will never let you code your own game/application though.
[Never mind... solved it myself]
sorry for the double post.. however i did some major overhaul to the OP with what i figured out. from here i have a basic script that can cross reference names of players from other games but currently can't add this in in any way since i don't know how to add info from the demigod stats. if anyone has any info i'd be really thankful
There are many great features available to you once you register, including:
Sign in or Create Account