Entity Resources Replacement[ V 1.4 ]
3 Attachment(s)
Entity Resources Replacement 1.4 Release: 20.10.2014 | Last Update: 29.06.2016 IF YOU ARE UPDATING FROM VERSION 1.3: REMOVE YOUR OLD CONFIGURATION FILES AND DOWNLOAD NEW ONES(INSIDE ARCHIVE). THEY WERE REWRITTEN, ALSO A TYPO IN DYNAMIC REPLACEMENT FILE NAME WAS FIXED. Table of Contents Description top Requirements top Installation top[INDENT] To install the plugin:
To install orpheu:
To compile locally:
Configuration top API top Credits top ChangeLog top Downloads top
|
Re: Weapons Model Replacement[ OKAPI ]
Seems nice but i think you should explain why we should use this instead of Chronic's one.
|
Re: Weapons Model Replacement[ OKAPI ]
Quote:
1. He is using currentweapon for changing weapons models. 2. He is using format and not formatex. 3. So on... 4. Mine use okapi which patch the string directly into memory, just one time. |
Re: Weapons Model Replacement[ OKAPI ]
Have you try to change string longer than original?
Example: models/v_ak47.mdl --> models/v_ak47_the_one_and_only.mdl Because in Orpheu we can't patching string > original string. ** Edited ** Nevermind Quote:
|
Re: Weapons Model Replacement[ OKAPI ]
I don't like to test plugins in my oficial servers and i am lazy to read the code so is better to ask. If i run an external plugin for give some people private weapon skins wich are set at item deploy, would that external plugin work?
And since i am talking about this, i think it would be a nice idea to allow setting skins by user flags and also steam id (Steam ID would override flags). Would be more original and make a easy job for many people :) Could be: .Normal Replace - "models/v_knife.mdl" "models/hamlet_server/v_knife.mdl" .Flags Replace (Example, ADMIN_BAN) - "models/v_knife.mdl" "models/admins/v_knife.mdl" "d" .Steam ID Replace - "models/v_knife.mdl" "models/jhob/v_knife.mdl" "STEAM_0:1:39788919" |
Re: Weapons Model Replacement[ OKAPI ]
I don't see the point of wmr_safemode_off cvar ; as it should fuck up memory if you use a new string size > original size one (like you example..)
Quote:
|
Re: Weapons Model Replacement[ OKAPI ]
I believe you can use other stuff to save strings into memory, even if not only one time, there is stuff that require such few cpu consume that people won't really care. But using an external module just for this thing seems useless and many people might dont want to use it. Example, i know one owner of a big community that has the server really high ranked. He owns it for like 5 years and few weeks ago i was helping him fixing chat crashes and when i sent the sma he didnt knew what it was because there are many people who just comes and download amxx.
Since you using that module just for a few memory settings, i think its a bit useless. But at the end its your choice. |
Re: Weapons Model Replacement[ OKAPI ]
Quote:
Quote:
Quote:
No, only possible with okapi/orpheu which acts in the same way. The point of this plugin is to use the best way, it's not my problem if some owners can't read the instructions or if they are not able to use it. |
Re: Weapons Model Replacement[ OKAPI ]
Quote:
|
Re: Weapons Model Replacement[ OKAPI ]
Because I don't like to write much text when it's not needed. For auto-loading, in the past I experienced some problems, this is why I'm writing this in the install instructions but if you say that now it's working fine it's ok.
About safe mode cvar, I know it's a bit useless and unexperienced owners may screw up memory, I don't know what was in my mind when I've added this. UPDATE: V 0.2: + Added support for sounds + Removed the cvar. |
Re: Weapons Model Replacement[ OKAPI ]
Well, when you have your definitive final version, you should request an approver/moderator to add everything to zip file including amxx for make the job easier to who doesn't knows how to compile localy.
And nice that you added sounds support :) |
Re: Weapons Model Replacement[ OKAPI ]
Quote:
|
Re: Weapons Model Replacement[ OKAPI ]
I don't have much to say for now, but I think you should review your "Usage" section. It's confusing and kind of unreadable.
Like for example: - you say in 1. to create a file, but you provide already a config file. - The config file should contain a dummy example with explanations. - Make sure to warn about not using mp3 sounds. - Make sure to emphasis about the length restriction. - Make sure to emphasis about putting the map name. - Your example should follow your current config file syntax, and you should not hesitate to use [code] bbcode. - No need to duplicate 2 times your examples - Basically rewrite the whole section \o/. |
Re: Weapons Model Replacement[ OKAPI ]
Ok, this is for the topic, about the code do you spot some problems ? Yeah, I will rewrite it.
Edit: done, new file uploaded. |
Re: Weapons Model Replacement[ OKAPI ]
Code as it is seems ok.
Though you can always improve a bit:
|
Re: Weapons Model Replacement[ OKAPI ]
I like too much my parsing method and if a user simply fallow the instructions he can't be wrong :D
Everything else updated. |
Re: Weapons Model Replacement[ OKAPI ]
But I don't care you like much your method. :twisted:
You should also be aware that you can be sure user won't follow instructions. Never trust user. A gold rule. This is not a joke. When you think again, more things:
Since I'm a evil bastard, the last point should make you realize your plugin is no more about only Weapon Model anymore but a generic memory replacer for entity's resources. That's it, your plugin can replace any sounds/models/sprites that the game precaches. You should rename your plugin to something else. Don't tell me you want to keep only for weapons, it would not make sense at all since your plugin would already allows that \o/, and it's better to be generic so your plugin has more chance to be used for more things. If you are a masochist, you could take the thing a bit further, like config file allows to replace any string (so not a file, your have already the code ready). If you are a masochist, you could add some parameter in config file to replace any string in the engine library as well. |
Re: Weapons Model Replacement[ OKAPI ]
Quote:
|
Re: Weapons Resources Replacement[ OKAPI ]
You did not rename your plugin. What plugin does is not related to weapon specifically anymore, but to entities more generally. An entity can be a weapon, an item, or anything else like func_*, env_* etc. Such entities precaches resources as well (just look at HLSDK.
|
Re: Weapons Resources Replacement[ OKAPI ]
Quote:
Check the code, forget the name, it can be easely changed :P I'm sure you still have a lot of suggestions. |
Re: Entity Resources Replacement[ OKAPI ]
nice, really nice. Btw you could tell us wich sprites it can replace. For example i heard that radar sprite is impossible to replace so you should make a list. But very nice, i start liking and considering to use this plugin :)
|
Re: Entity Resources Replacement[ OKAPI ]
Attachement removed, just spotted some dumb mistakes into the source, I will upload it when they are fixed.
Edit: fixed. |
Re: Weapons Resources Replacement[ OKAPI ]
Quote:
|
Re: Entity Resources Replacement[ OKAPI ]
Done. I've added a second array with only the string that were replaced for unpathMemory function, to avoid making the same checks as in pathMemory. The topic will be rewrited tomorow.
|
Re: Entity Resources Replacement[ OKAPI ]
you edited your plugin's name ? so basically it's no longer a replacement of the Weapon Model Replacement but a replacement of the Content Replacer one. right ?
my advice is to make separate plugins, and to use easy topic names (to search for/remember them easily). |
Re: Entity Resources Replacement[ OKAPI ]
Quote:
|
Re: Entity Resources Replacement[ OKAPI ]
Actually just put "String Replacement" in your thread tittle, it just change string.
This replacement is for global. The plugin from GHW is better because you can replace string > original. I believe every community has it own sound/models/sprites folder, and of course they want use their own path (sound/picollo/mysound.wav). Your plugin is limited and i don't think this is useful. You can do with Opheu too, see http://forums.alliedmods.net/showthread.php?t=117930 Very simple right. |
Re: Entity Resources Replacement[ OKAPI ]
Quote:
|
Re: Entity Resources Replacement[ OKAPI ]
Same for you, is there a specific reason you're ranting and raving about this?
But I agree that this plugin should not be considerated as a total replacement of existing plugins. Both plugins have its pros and cons. That's why description should be more clear about it. It's fine to have both way. |
Re: Entity Resources Replacement[ OKAPI ]
Updated to 0.5, this brings some code improvements and some mistakes fixed.
|
Re: Entity Resources Replacement[ OKAPI ]
Your first post is better. But you should improve more because you don't explain properly all and this could be confuse some people.
There is something you should keep in mind: your plugin is an alternative to some plugins. Because of your plugin can't replace all features of others plugins, you can't consider this one a full replacement. This could be the case depending the admin's needs, but by default, no. Next, your description doesn't tell really what the plugin offers, in the meaning, why should I use this plugin. Your comparison section is welcomed, but I think that's something which should written below the plugin description (included, I mean) as it matters to know right away what plugin can do and what it can't do. Also, your last sentences from "Sure that..." are sincelery pointless, as this doesn't help to understand. I won't tell you how to write it, but in my opinion, this could be similar to something like (just main idea): Quote:
Some notes:
-- About code:
About improving plugin, if you want this to become really a remplacement among all existing plugins, then you should also hook forwards. Since you're using Okapi, you could for example for weapons hooking directly DefaultDeploy(), etc. You could create a more advanced configuration and depending what want the admin you choose between memory patch or hooking forwareds. Well, just give some thoughts. |
Re: Entity Resources Replacement[ OKAPI ]
Haha, like i said this is not useful at all, better to make it as tutorial. Sorry to say that.
|
Re: Entity Resources Replacement[ OKAPI ]
How it's not useful. Elaborate?
|
Re: Entity Resources Replacement[ OKAPI ]
Quote:
Like ZP it hook FM_SetModel to detect grenade throw, if our path has been patched what will happen to the ZP plugin? |
Re: Entity Resources Replacement[ OKAPI ]
Does GHW plugin unprecaches old resources? No. Just that, plugins makes sense.
Own custom path? Just rename it. This is sincerely not a valid argument. how about other plugin that hook FM_SetModel? That's the whole point this plugin is not replacement but an alternative. You could want to build a very efficient mod around this for example. It would be a good idea this plugin stores somewhere the old resource string, and others could check this, this could improve a bit compatibility. This is the most annoying side-effect, but not that a big deal. Also, this you're using this plugin, this doesn't make sense anyway to use others plugins which change same resources. Like it has been said, both have pros and cons. It's all depending the needs. Nothing wrong with that. On the contrary, you have more choice to how build your configuration. No need to bash this plugin because you don't have any use with it. |
Re: Entity Resources Replacement[ OKAPI ]
Quote:
But ZP change w_hegrenade.mdl for 2 models (1 for human and 1 for zombie). Whatever, but yes it's good to replace a string for global. K Bye. Eating kebab. |
Re: Entity Resources Replacement[ OKAPI ]
But there is no reason to use both at the same time. You have also a config per map, and you can also not replacing with this plugin the w_ model if you have another plugin changes it. At the end, just a matter to understand what does the plugin and to configure properly. That's why I want the first post be clear about this.
|
Re: Entity Resources Replacement[ OKAPI ]
Post updated, also updated the plugin.
+Remove some useless arrays +Added a native for campatibility purpose +Code optimized, less checks. @yokomo, I understood your "problem", if you don't find this useful is fine, just avoid the theard. But I can't get why you say that, you are not limited only at weapons and the biggest problem with FM_SetModel had been solved by adding a native that will point you to the replaced string :D |
Re: Entity Resources Replacement[ OKAPI ]
Plugin looks sexy, although I probably will not need it. :)
But I am sure I will link this to others when they need to replace stuff. |
Re: Entity Resources Replacement[ OKAPI ]
Quote:
Arkshine, I need your opinion here. Let's say that someone replace the string abcd with the string ab. Now everything is fine, but in unpatchMemory it will try to replace ab with abcd, and abcd is longer than ab, so here the problem appear. Sure that I can request that the strings to have the same size, but I don't like to add one more restriction. What do you think ? I can ignore the okapi restriction here... |
All times are GMT -4. The time now is 15:36. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.