Jump to content
Official BF Editor Forums

AncientMan

Members
  • Posts

    48
  • Joined

  • Last visited

AncientMan's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. If anyone is interested, the source for PRMasterServer is here, under the GPLv3 license. https://github.com/AncientMan2002/PRMasterServer Feel free to fork it and submit pull requests for fixes and features and support for new games
  2. Sorry to burst your bubble there and tell you that you're wrong, but PRMasterServer was completely coded from scratch by me. It's not using any part of that gsloginserver code which I assume you're referring to (which yes, is crap and broken). It has 17,000 odd accounts created at the moment, hitting peak player counts of about 500 online and about 60 servers, and hasn't broken a sweat. Of course, you can't really compare PR and FH2 player numbers to BF2's player numbers, but seeing how it's using a massive 0% CPU, 25 MB RAM, and 2 KB/s of network traffic, it's not exactly near any limits .
  3. No offense, but if you're modding Battlefield for money, you're going to be disappointed. Go make an indie game using Unity or UE4 if you want money...
  4. Project Reality: BF2 just released v1.2 which ditches GameSpy for PRMasterServer. This is a custom application that I wrote myself from the ground up that handles accounts, server listings, CD keys, and a few other little things. It doesn't handle stats or anything like that since PR doesn't use stats. FH2 will be using this server as well. About 2 hours after release in off-peak time and we've raced past 1000 registered accounts. It's still early days, but things are looking pretty promising . Only took about 2 or 3 days to code up, so pretty happy to see it performing well I hope the other community driven GameSpy replacements have similar success. Please though, put focus on security. The people who use these servers are trusting you with their email addresses and passwords and all sorts of other information. It'd be pretty bad if you end up getting hacked somehow and these get leaked. It's not difficult to take a few basic precautions. We're considering open sourcing PRMasterServer for all to benefit from, but for now we're going to be keeping a lid on it. Need to closely monitor it, make sure it performs well over the next few weeks, apply updates as needed, etc. But I guess it pretty much depends if we get any one interested in our solution, at the moment only FH2 has bothered about asking us
  5. Masking is the correct term for this, and there's a command called hudBuilder.setPictureNodeAlphaMask, perhaps it may be of use to you?
  6. Yeah, those strings aren't there. The BFHQ menu's simply run off the dice.bf2.PlayerStats class, which contain function calls to hardcoded functions in bf2.exe or SwiffPlayer.dll or something. You're not going to be able to change the url inside flash. The flash menu also cannot use default AS functions such as loadVars or whatever, you have to solely rely on the dice functions for loading external data, which cannot be edited. You're better off just removing the BFHQ menu, and having the button close the game and go to your stats website. You could do something such as on (release) { dice.bf2.Multiplay.browse("http://stats.stargate4bf2.co.uk/getStats.php?playerid=" + dice.bf2.Profile.getStatPlayer()); // getStatPlayer() returns PID //_root.gotoPage("bfhq"); } Or you could have multiple buttons linking to the leaderboard, player stats, etc. But having it inside the flash menu is a no go unless you do as you were thinking and modify the hosts file (not good for compatibility with vbf2 or other mods), or edit bf2.exe via another exe with live memory editing or something (possibly not good with PB). There is another option however if you want to explore it. The flash menu can read a couple of files in the profiles directory. So you can exploit this for unused variables. You would launch your mod from a custom .exe (instead of bf2.exe). This exe does something like the following: foreach profile in "My Documents/Battlefield 2/Profiles" { read player info from Profile.con write player stats info to GeneralSettings.setBFTVSaveDirectory "" in General.con } launch bf2.exe + any provided parameters Then in the menu, you can use dice.bf2.GeneralSettings.getBFTVSaveDirectory() to get the info and do stuff with it. However, you'd be limited to only getting info on game launch, unless you could manage to get some sort of trigger going for your custom exe to update the info (such as doing something like dice.bf2.GeneralSettings.setBFTVSaveDirectory("update") and your exe detects the change and updates it). But that might not work as flash mightn't detect the change while the game is running. But yeah, the idea that you're going for, it's not going to work.
  7. The stats seems to be hardcoded functions (dice.bf2.PlayerStats class), so you're not really going to have any luck there. Loading the required amount dynamic data from an external source is also a no go, bf2 flash doesn't support it (could do so much stuff if that worked ) The only option I see is loading images created by PHP or something based on the parameters. But it'd be very download heavy (it'd be pretty slow to browse through), there'd be stretching issues, not very user friendly (wouldn't be able to do stuff like filtering/column sorting. Well, you could, but not easily ), and all sorts of other issues. But if you're set on a custom stats system inside the bf2 flash menu, that's the only way I can see it happening with my knowledge. TBH I'd just have the BFHQ button open up your stats website. Much more flexibility and able to be used outside of the game. Can do stuff like linking straight to the stats of the currently logged in player and stuff as well.
  8. menu_server.zip/nametag/nametags.con append to the bottom of the file: NameTags.MaxEnemyDistance 0 NameTags.EnemyTagFadeInTime 999 NameTags.EnemyTagFadeOutTime 1 NameTags.EnemyTagDelayTime 999 NameTags.EnemyDotLimit 001 All commands could've been easily found by using the debugger and pressing tab in the console and having a look through the available commands, they're pretty self explanatory.
  9. Have you tried adding a collisionmesh to the kits? PR has this, not entirely sure if this is the reason for it though. Also make sure that the object has been already loaded before trying to spawn it, by making those object spawners and running it from the map init.con (PR has these in the faction_inits/spawners folder, run from the faction_inits/faction_init.con file, run from the map init.con )
  10. It's xoffset/yoffset from the default position, dunno the scale it's using though, but you can see 50 moves it about that far away.
  11. Works fine outlawz? You should go through and get fixing all the PR maps with clipped cpnames while you're at it http://i.imgur.com/WeRya.png
  12. BF2 flash can't have external dynamic text (well not natively anyway). It will be an image container with the text being an image. Also, if you haven't realised already, everything is grey boxes . The boxes are used for basic positioning, then actionscript takes over and draws it through code. Just delete the image container and you'll be sorted . Or do a search for the actionscript name of the image container, and it'll show up in the code, since it has to be referenced for it to load the image.
  13. If you want, you can add in 20 or so frames right at the beginning of the timeline with a black sprite over the top. This will slightly increase the time taken to get to the login menu, but it will allow you to have a more random number, since the time will be increased, giving a more likely chance of a slight variation in milliseconds. As for adding in more images, just add the names into the array and fix up the range so it's from 0 to 6 or however many images you have... You could also do something like: this.background_img.loadImg(images[getRandomIntInRange(0, images.length - 1)]); Then you only need to add in new images into the array, and don't have to worry about changing the range.
  14. Math.Random() doesn't work in BF2 Flash (well it does, but it's not seeded by anything, so it's just the same number pattern over and over, which is probably since it can't get the time). To work around this, I built my own off the "getTimer()" function, which is a timer showing how long flash has been running, which should be different each time it's called, so it should give off a somewhat random number. Something like the following should do the trick (which gets the first decimal point number): function getRandomIntInRange(bottom:Number, top:Number) { var dif:Number = top-bottom+1; var random1:Array = new String(((getTimer()-1000)/1000).toString()).split("."); var random2:String = new String(random1[1]).charAt(1); return Math.floor(bottom+(dif*(random2/10))); } Then you would just call it like: var images:Array = ["Strokes_small.png", "Dirty2_small.png", "Bokeh4_small.png"]; this.background_img.loadImg(images[getRandomIntInRange(0, 2)]); Should work, was a while since I coded it for the random login images in Project Reality, can't remember if that's all I did or if I did something else to make it work...
  15. A dedicated server does not need stuff like textures, sounds, bundled/skinnedmeshes, etc, since there's nothing graphical. The server just has to handle connections, physics, etc. So why should a dedicated server have it all? The point of server/client files is for things that the dedicated requires to be in one place, so it can be easily distributed in the form of a dedicated server package. Of course, you can still run a dedicated server from client files, but it's just adding unneeded bloat. At least that's what I understand from it. Server loads "server" stuff, client loads "client" and "server" stuff. If you're running a local "listen" server, you'll also load "client" and "server" stuff.
×
×
  • Create New...