mod


(Miguel) #1

hi, if i create a simple mod with no code or dll’s and i name it pak0.pk3 and if i don’t make ppl install in etmain, they install in another folder like “mymod” and then have to run a shortcut to that +fs_game mymod or something… will punkbuster do something or it will work like a normal mod?


(Miguel) #2

better explained… if i create a mod with no code and install it in “mymod” folder (not in etmain) and then create shortcut to “mymod”, will punkbuster do something or it works like a norman mod like the mods that we install in etmain folder?


(jaybird) #3

All mods should be installed in a seperate folder. When you run the game, concat +fs_game modname. It will run correctly, assuming the compile is stable. As far as punkbuster is concerned, you have to turn it on yourself (through config file, for instance). Dunno what you mean by “no code”. If you have no code, you get nothing.


(carnage) #4

???
normal mods inside the ET main?
!!!

mods run from outside the etmain, when the game looks for a file and if it cant find it in your mod folder then it goes to the etmain. thus saving you having to make a compleate copy ET to make a mod

jaybird beat me to it

btw i think he means that there is no coded section in the mod e.g. a skin moddifying mod


(djmels) #5

no code -> you can add images, sounds etc. (media), to replace things like textures and other in-game stuff, without touching notepad… you also won’t have to use the “other folder” method then, since you can also make a .pk3 file (not pak0.pk3) and put it into the etmain folder, just keep the FIRST letter of the filename anything that comes after p in the alphabet, cuz ET extracts all the pk3’s to the memory from a to z.


(carnage) #6

dont get exactly what u mean, i could see how it would work but how would the game no wether you want to run thoes files in the .pk3 or not

the best thing about the other folder method is the fact that its easy to run a mod by just creating a shortcut to your et and adding a small extra on the end

anyone who can use an instaler program can make this happen automaticaly e.g. TC:E does this (want to see, look at the properties of the shortcut the game)


(SCDS_reyalP) #7

You can make a ‘mod’ that is only things like skins, sounds etc, and put it under different fs_game with no problems (aside from the standard et problems related to mods in et). If you name the pak file pak0.pk3, I suspect you would have to replace all the resources in pak0.pk3, which might not be what you want.


(djmels) #8

You’re right there. When the .pk3 is in the etmain folder, ET extracts it. The last pk3 it extracts is, as I said, the last file in order of alhabet. If the ET engine finds a file within a pk3 pack, that it’s either already unpacked or is in “raw” form in the etmain folder (not in a pk3).
On the other hand, for a (custom) map or a simple (no gameplay-invasive) mod , the best method to use is mine I think, since you’ll want the server or client to ALWAYS unpack the map’s pk3, so you can use these files later on. If, for example, you run a server, you can tell it to /map yourmap without having to restart the server. The downside is that some things a player may not like are “installed” anyway, for example a tiny mod containing a replacement Main Menu background that looks like crap.
I think you shouldn’t use the separate folder method unless you’ve really made a Mod with a capital M, in that it actually changes the gameplay and in essence makes it a different game. This is because the fs_game variable is read-only from the millisecond it is first set, so the server admin or the player can only run one mod using the separate folder method at a time. I’d be very pissed off if I had to make the choice between hosting etpro or a sound/skinpack, because the two are (unless you do REALLY strange things) perfectly compatible.
When you’ve made a mod that doesn’t only consist of a pk3 file but also a “raw” part, such as I believe etpro uses on the server, you DO of course need to use the separate folder method.

edit SCDS_reyalP, no you won’t have to replace every file in pak0.pk3 if you put the modified (tiny) pak0 in a fs_game folder. As said earlier in the thread, ET will only get from etmain what it can’t find in the mod’s directory, so you’ll only have to put the files you want to replace in the modded pak0. And, as I say above, making such a “futile” mod in a separate folder prevents users from running any other mod, forcing them to choose your mod (skins/sounds) or something like etpro. 99.9% of people are going to remember your mod as “Isn’t that the file I deleted yesterday?”…


(carnage) #9

see your point djmels

although it seems a bit more risky to the system

what i still dont understand is though, will mods instaled in your way always run? or only if specified


(djmels) #10

The ET engine will do the following: Any and all files in the etmain folder with the .pk3 extension are extracted to the system memory (so NOT to the HDD). It starts at, say, “a*.pk3”, finds some files in there, and puts them in the memory. If it encounters a file in i.e. b*.pk3 that has the same filename and path (paths are stored inside the .pk3, of course) as the file in a*.pk3, it will simply overwrite. So the answer to your question is: it depends. As a rule of thumb, use: “The file name of my .pk3 file has to come LATER in alphabetical order than the .pk3 file it was originally located.” This means that when you want to f*ck up the progress bar of the player’s “Loading…” screen, with your clan’s logo or something, you should follow the following steps:

  1. Check the clock. if (time > 0200) {sleep}
  2. Take the original image from your unzipped pak0.pk3
  3. Edit it with MS Paint. You’ll need a .TGA plugin for it though… :headbang:
  4. Make a file structure somewhere on your HDD that is an exact copy of the structure in pak0.pk3. The difference is: only create the folders that contain your edited image.
  5. Put the edited image in the folder where it was in pak0.pk3, but now in your own structure.
  6. Go to the parent folder of the highest folder in the structure, for example the parent of “gfx”, “models”, “maps”, “levelshots”.
  7. Select the folders you need to include (in the example: gfx)
  8. Right click, Add To Archive…
  9. For the rest, see above.
    In short: to get the best chance at a working mod, put a “z” before the filename of the pk3. This makes sure that your .pk3 is almost always the last file to be extracted and thus gives it the least chance of being overwritten by files from other pk3’s.

(carnage) #11

yeah i understand that but…

does that mod run permenantly now or do you still have to trigger it, form what i sounds like you are doing it will basicly hide a pk3 in some unsurspecting users file and then every time he runs the game all these unwanted effects pop up,

infact i have a prolem like that where my thompson skin has writing on it when i run standard ET in /devmap mode ever since i played a server with shadowmod

if this is so… i dont care how inconvinet it is run mods in mod folders as the developers intended it to be run and stock ****ing up other poeples games, have some considersation ffs


(No1_sonuk) #12

I think they’ll run permanently, but some files are pure protected. i.e. the effect you’re having, carnage, is probably due to this. When you play online, the server purity prevents the mod from appearing, but when you run local, you see it.

I have something similar when I play local - I have the MG42 replaced with my MG34 model, and the Thompson with an M3A1 Grease gun (test setup for PoP), but they don’t show up on pure servers.


(carnage) #13

well i supose its ok for most ppl who will just be on the public servers but for me when i test my maps i dont want all these effect happening

realy i think the separate folder should be used, its very easy to acutualy combine to mods like this


(SCDS_reyalP) #14

If you put a ‘mod’ in its own fs_game, users will have to set their fs_game (or connect to a server using that fs_game) to see the modifications. If you put it in etmain, it will show up whenever they host a local game. (or not at all, if it is in the wrong place in the search order)

If you want to map, or test things offline, the best thing to do is to have another copy of et, which you only put the files you want in.

In general, i’m not fond of sound/skin/texture whatever mods in etmain. I don’t find they add much to the game, aside from confusing players and wasting bandwidth.


(Miguel) #15

better then explained… Thanks guys!


(djmels) #16

This problem is somewhat of a glitch in ET, I think. It was designed as a commercial release game, but the combined creators changed their minds and made it open-source at the last moment. This made it MUCH easier to mod, since you could just download the source code and change whatever you want. Doesn’t apply to this kind of mod, but it sure as hell will have given a lot of admins/modders the idea.
Indeed, when you put a .pk3 file in etmain, which is what happens when ET does a “server download” too, it ALWAYS runs. Nothing to do about that, but removing the file.
I’m thinking of making a simple tool peepz can use to manage their PK3’s, define sets of PK3’s that should be kept in the etmain folder, while keeping “unwanted” PK3’s in a different folder outside of the ET base folder. The tool would manage both folders, allowing users to add descriptions to PK3 files and adding servers to the info, so the user can put all the paks a certain server needs in the etmain folder in one mouse click.
Yes, it IS annoying. I can imagine a LOT of people with no idea how ET works, getting very pissed off when they can’t start ET because some prankster server admin installed a PK3 file on the server that modifies the Main Menu, which is ALSO overwritable from any PK3, replacing it with a blank white screen saying “Muhuahuahahahahaaaaaah!”. Haven’t encountered this kind of arsejoke before, and I wouldn’t doubt very long about bruteforcing that server’s RCON password, and killservering it (if it’s a rented server, it will take some time before some asshole at the host company will restart it, and if they’re really stupid they don’t even change the RCONpassword :D)… The problem is, that this PK3 file is run at startup of ET, so BEFORE connecting to a server that will put purity checks on the client’s collection. The ET engine is stupid enough to replace its own, good, main menu script with the fcked up version, thus enabling pieces of shit to distribute “ET Viruses”. DO ME A FAVOUR, AND DON’T TRY TO BE FUNNY WITH THIS. YOU CAN MAKE MOST PEOPLE THINK THEIR WHOLE INSTALLATION IS FCKED, FORCING THEM TO REINSTALL. Sorry for the capslock, just had to shout that :wink:
The only solution is regularly playing in the same servers (Favorites in either ET, XFire or some other managing program), regularly kick unfamiliar PK3’s out of your etmain, use your firewall to setup block rules for the servers that host these bad PK3’s (so you’ll be reminded by your firewall saying it blocked communication and by ET crying it can’t connect) etc., I guess…


(djmels) #17

Just tested the theory in my last post, and it worked. But not when you use the +set fs_game etpro command, cuz ETPro contains an edited Main Menu, which makes the ET Engine forget about any main menu script in etmain. So peepz using a modified shortcut are safe for a while :wink:
Made a screenshot:

Clicking the Muhuahahaaaaah! button in this example results in the game instantly closing.


(LION) #18

muha is ja doll
nice work


(carnage) #19

i have though of a workaround for you, the separate mod folder basicaly creates a etmain folder with custome files in it, plce your mods inside a separate folder then run this as a mod it should run all mods inside it as long as they are non conflicting, that way we can keep clean ET and run as many no conflicting mods as we like


(djmels) #20

Hmm… Though what you suggest does give a few problems, you’re right. The problem:
-You can never combine two “real” mods (real mods -> mods that have an edited .dll and .so), same filename = overwrite…
But indeed, you can put a mod without .dll and .so files into for example the etpro folder, packed in a .pk3, allowing you to choose from a) a vanilla ET or b) ETPro with the extra mod. Running etpro without the mod would be impossible without copying the etpro folder, giving it another name like “etpro_plusmod”, so you CAN choose.
semi-offtopic Hey, there’s a great idea I just got… Keep your eyes out for a post in the ET Mapping forum :wink: