Skip to content
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Donate
Collapse

Plutonium

FutureRaveundefined

FutureRave

@FutureRave
VIP
About
Posts
428
Topics
10
Shares
0
Groups
2
Followers
58
Following
26

Posts

Recent Best Controversial

  • Storing players data with chaiscript
    FutureRaveundefined FutureRave

    Hello,
    in a previous post, I've asked if it was possible to make an on-screen Killstreak counter. With some help, I was able to come up with something. Before I go forward, I want to specify that I have installed the plutosctript framework .dll in the plugins folder and that I have successfully tested the welcome script described in this post https://forum.plutonium.pw/topic/571/tutorial-chaiscript-for-iw5.
    So the question that I have is how do I store in an efficient way the various players that are going to login/logoff and update such data structure each time a player is killed. I come from a Java background so I'm not entirely unfamiliar with c++ but I'm new to chai script and I've only found just a few of meaningful scripts here and online that I could look at to see how the syntax works etc.
    So here's the source code:

    var kills = 0;
    entity players[18]; //Store players this way? A better data structure?
    
    level.onNotify("connected", fun(arguments) {
            // you can make new var
    
        var player = arguments[0];
        addPlayer(player);
    
    	var hud_text = gsc.newClientHudElem(arguments[0]);
    	hud_text.set("x", 540); //Approx middle of the screen
    	hud_text.set("y", 0);
    	hud_text.set("font", "hudbig");
    	hud_text.set("fontscale", 0.65);
    	hud_text.setText("^1Killstreak: " + kills);
    });
    
    def onPlayerKilled(ePlayer, eInflictor, eAttacker, iDamage, sMeansOfDeath, sWeapon, vDir, sHitloc, iTimeOffset, iDeathAnimDuration)
    {
     //Get ePlayer from entity and set kills = 0
     // Get ettacker and add 1 kill to counter
    
     resetCount(ePlayer);
     
    
    }
    
    add_callback_player_killed(onPlayerKilled); //Copied this line from the pluto framework github
    
    def addPlayer(connectedPla) 
    {
        for(int i=0;i<18;i++)  
        {
          if(players[i] == null) 
          {
            players[i] = connectedPla;
          }
        }
    }
    
    def resetCount(deadPlayer) 
    {
      for(int i=0;i<18;i++)  
        {
          if(players[i] equalsMethod? deadPlayer) 
          {
            kills = 0;
          }
        }
    }
    
    def onPlayerDisconnect(ePlayer)
    {
     //remove player from data structure;
    }
    
    add_callback_player_disconnect(onPlayerDisconnect);
    

    So when a player connects the onNotify() should add it to this "entity array" (which I know probably won't run) and then when it disconnects it should be removed. When a player dies the text on the screen should be updated using the Player and eAttacker parameters, I wish to find a nice way to iterate through this data structure and update the kills var of both players (does the method onPlayerKilled() trigger even when a player dies of fall damage or other?).
    Also, how would I update the var hud_text?

    This is what I was thinking for an Object that stores the data that I need but I don't know if chai script supports something like this or not.

    struct Player {
        int kills;
        std::string name;
        std::string hud_text;
        public:
    
        Player(std::string name, std::string hud_text) {
            this->name = name;
            this->hud_text = hud_text;
        }
    
        void resetKills() { //Trigger on death
            kills = 0;
            hud_text = '0';
        }
    
        void add() {
            kills += 1;
            char* intStr = itoa(kills);
            hud_text = std::string(intStr); //Actually hud_text.setValue(std::string(intStr)); should be used I think
        }
    };
    

    I would really appreciate the feedback from some of the more expert coders here on how to implement a data structure. Is it possible to store this struct in an array and access the data of the various players when the functions resetCount/PlayerKilled get executed?
    Thanks a lot in advance.
    Edit 1: Now that I think about it, where does the game store the killstreak value of the player? They must be stored somewhere, is it possible to access this number using chaiscript?

    MW3 Modding Support & Discussion

  • Problems with Master List
    FutureRaveundefined FutureRave

    Of course, keep in mind that I'm running basically the default setup for the server, I basically only removed rust from the map rotation and basically that's it. And for the sake of testing (if I've done something stupid) I disabled WIndows firewall
    This is the StartServer.bat

    @echo off
    .\bin\plutonium-bootstrapper-win32.exe iw5mp "C:\Program Files (x86)\Steam\steamapps\common\Call of Duty Modern Warfare 3" +set key "KEY +set net_port "27017" +start_map_rotate -dedicated 
    

    Log:
    https://pastebin.com/ETV9eutu

    Edit 1:
    Nevermind now I see the server in the list. I wish to know what the **** I've done other than disabling the firewall because this is not the first time I disable everything because the thing doesn't show up lol. I'll post edit so to see if it was Windows Firewall or something else.

    MW3 Server Hosting Support

  • Problems with Master List
    FutureRaveundefined FutureRave

    Thank you for the quick response, I checked with the tool and basically the ports result open. Specifically, it says Open|filtered with service unknown for the master port and half-life for some other ports I also opened.

    MW3 Server Hosting Support

  • Problems with Master List
    FutureRaveundefined FutureRave

    This question "I don't see my server on the Master List" has been asked so many times and I apologise for that.
    But I think I have a different issue than others:
    I'm using Google Cloud VM instance feature to create my instance where I intend to host the server.
    I followed the tutorial and I am able to start the MW3 server with no problems, or so it seems.
    If I type 'status' I get the usual response that a working server would give but it doesn't show up in the master list.
    I figured this problem is much more complex than just opening some ports on the firewall.
    Does anybody know if this is caused by an improperly VPC setup?
    I'm not a super expert on the matter, I tried to read the documentation provided by Google and the 27000-28000 ports are opened for ingress/egress traffic and VM instance is properly tagged for the firewall rules to apply so the ports are not the issue.
    It seems that I am missing something else to allow others (Including me) to reach the Instance because even I can't join it if I try to direct connect (nothing happens).
    I was wondering if there is a networking expert here who knows how to deal with Google Cloud.

    P.S.
    I have obtained in the past the 300 euro voucher for Gcloud for free (a signup bonus) so that's why I'm using their services and hopefully I can get this thing running.

    Many thanks

    Edit:
    I don't think I need to create a Cloud NAT because the last thing I want to confuse incoming packets is to use a shared IP. (Or am I wrong?)
    So do I need to manually create VPC to decide where the traffic goes?
    Edit 2:
    I found out a lot of people use OVH as their VPS provider for MW3 Basically one friend of mine sent me a screenshot of his desktop (VPS) and there's is the Google Cloud shell. Basically OVH uses Google cloud to create VMs and then resells you the product. So now I'm 100% sure that there's a way to make a MW3 server using Google cloud (without giving money to a third party). So I would appreciate it very much if someone know how to setup the networking part.

    MW3 Server Hosting Support

  • MSVCP140.ddl is missing - System Error
    FutureRaveundefined FutureRave

    @Mr-Android
    Can confirm this was the issue.
    Download this exe from Microsoft https://aka.ms/vs/16/release/vc_redist.x86.exe

    MW3 Server Hosting Support

  • MSVCP140.ddl is missing - System Error
    FutureRaveundefined FutureRave

    20200513_121652.jpg
    I am following the tutorial for Windows (Using 2012 datacenter). I forwarded that port specified in the tutorial creating a new network rule in Gcloud so that shouldn't be an issue.
    The MW3 folder was downloaded straight from steam (Not the "tool" but the multiplayer game itself: regular install).
    So the key is set in the .bat, the plutonium bootstrapper is indeed inside the bin folder. Has anyone got this error before?

    Edit 1:
    This is my start.bat, inside the %appdata% there is nothing related to a bin folder. According to other posts I should put the bin folder in Local? Can somebody clarify this? Is this missing dll issue or misplaced bootstrapper?
    Echo off
    .\bin\plutonium-bootstrapper-win32.exe iw5mp "C:\Program Files (x86)\Steam\steamapps\common\Call of Duty Modern Warfare 3" +set key "---" +start_map_rotate -dedicated

    MW3 Server Hosting Support

  • wine libpng12.so.0 error on startup
    FutureRaveundefined FutureRave

    Hi, I followed Spectre tutorial to the letter for the Headless server, I chose Ubuntu 18.
    Because I have some free credit on Google Cloud I used their compute engine service (this shouldn't matter I think).
    The last step says this:
    wine .\bin\plutonium-bootstrapper-win32.exe iw5mp ~/server/ -dedicated +start_map_rotate +set key <SERVERKEY> +set net_port 27016 +set sv_config server.cfg

    First of all, unless I messed up, the bootstrapper is inside the pluto folder so I, in my case, I had to modify the string above to ... .\pluto\bin\ etc... to execute the bootstrapper with wine.
    (A suggestion that I have is to add in the tutorial a step where you write the start command inside a .sh file do chmod +x start.sh so that you don't have to type that each time while copying and pasting the key)
    The key that I have seems to work.
    I finally run the command runs and I get this weird error saying that wine can't find this png "libpng12.so.0" and the process terminates
    How can I fix this? Keep in mind that I am doing all of this with the terminal only (headless) so I can't even see the files that I have in each directory unless I do "ls", is this png file placed somewhere else?
    Finally, my VM is using two cores I think with 7.5 GB of ram. (Does MW3 need more cores?)
    Thanks

    Capture.PNG

    MW3 Server Hosting Support

  • On-Screen Killstreak Counter
    FutureRaveundefined FutureRave

    Hello, I'm new to the Pluto plugin/script development but I have some previous experience in Java (OOP alike).
    I friend of mine gave the script in c# for Tekno which displays the killstreak counter on screen. I wish to port this to Pluto MW3
    First of all, it would be great if some could clarify the pro and cons of using chaiscript rather than c++ plugins. What is the main difference (plugins more capable than scripts?).
    Which of those has the capability of doing some like this? Keep in mind that the counter should remain at a fixed position (let's say top screen).
    Has someone already made a similar thing?
    I really need someone to point me in the right direction before I start coding.
    Thanks

    Edit 1:
    Okay, I've read carefully other posts on this forum and this is where I am right now:
    1.PNG

    This is supposed to be the project setup.
    Now let's say I want to do the hello world message like in the tutorial.

    level.onNotify("connected", fun(arguments) {
    	var player = arguments[0];
    	
    	player.onNotify("spawned_player", fun[player](arguments) {
    		helloWorld(player);
    	});
    });
    
    def helloWorld(player)
    {
    	player.iPrintlnBold("^1Hello, world!");
    }
    

    where do I chuck this code? Do I need extra headers to code for Pluto?
    Thanks

    MW3 Modding Support & Discussion
  • 1 / 1
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Donate