Raised This Month: $ Target: $400
 0% 

Entity Resources Replacement[ V 1.4 ]


Post New Thread Reply   
 
Thread Tools Display Modes
axfalcon
Junior Member
Join Date: Apr 2016
Old 04-22-2016 , 07:51   Re: Entity Resources Replacement[ V 1.4 ]
Reply With Quote #151

Both actually. I've just tried one, and then the other alternatively without change. Does the control over the sprites differ from the control over the weaponsModels perhaps?
axfalcon is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 04-22-2016 , 08:20   Re: Entity Resources Replacement[ V 1.4 ]
Reply With Quote #152

For God sake, tell me what file you are using. For complete one, there is a limitation regarding path size.

PHP Code:
Does the control over the sprites differ from the control over the weaponsModels perhaps
That makes no sense. I told you before that using orpheu you can patch any strings, not only models, sprites, sounds or whatever.

Plugin is working, the problem is likely that you are using it wrong. But, if you don't tell me what you are exactly doing I can't help you.
__________________

Last edited by HamletEagle; 04-22-2016 at 08:20.
HamletEagle is offline
axfalcon
Junior Member
Join Date: Apr 2016
Old 04-22-2016 , 08:37   Re: Entity Resources Replacement[ V 1.4 ]
Reply With Quote #153

Quote:
In what file are you trying to replace the sprites? comp or dynamic one?
Quote:
Both actually. I've just tried one, and then the other alternatively without change.
Apologies, I meant I was using both comp and dynamic files. So entities_resources_comp_replace.ini and entities_resources_dyn_replace.ini

Thanks.

Quote:
I told you before that using orpheu you can patch any strings, not only models, sprites, sounds or whatever.
I've a faint idea of what a string is and how it's used in this context however, I have yet to learn or see how an engine such as half-life is stored in mem at run-time etc. I'm new to this memory concept, learnin though

Last edited by axfalcon; 04-22-2016 at 08:38.
axfalcon is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 04-22-2016 , 09:21   Re: Entity Resources Replacement[ V 1.4 ]
Reply With Quote #154

Do you get anything in logs? Anyway, I have the impression that you can't replace this sprites. Anyway, you can give me the sprites so I can test.
__________________

Last edited by HamletEagle; 04-22-2016 at 09:22.
HamletEagle is offline
axfalcon
Junior Member
Join Date: Apr 2016
Old 04-24-2016 , 02:50   Re: Entity Resources Replacement[ V 1.4 ]
Reply With Quote #155

Attached are sprites old and new. I have FastDL in the server.cfg however my hoster seems to block the .bsp and .mdl files, which download slowly from the game server. These .bsp and .mdl files still downloaded to my cstrike_downloads folder however, upon checking the .spr files did not.

This is inside my entities_resources_comp_replace.ini file:

Code:
;Example:
;This will change all ak47 models to m4a1 ones. This models paths has the same size, so it's fine.
models/v_ak47.mdl models/v_ak43.mdl
models/p_ak47.mdl models/p_ak43.mdl
models/w_ak47.mdl models/w_ak43.mdl

;SPRITES:
;old_sprite new_sprite
;You must include sprites/ in path.

;sprites/awp.spr sprites/awh.spr
sprites/sniper_scope.spr sprites/sniper_scoph.spr
sprites/640hud7.spr sprites/640hid7.spr
sprites/radar640.spr sprites/radar641.spr

;Example:
;This will change he grenade explode sprite.
;sprites/fexplo.spr sprites/explo2.spr

;Add your custom resources here:
and this from the logs upon each map change:

Code:
L 04/24/2016 - 10:08:24: -------- Mapchange to fy_pool_day_hd_beta11 --------
L 04/24/2016 - 10:08:25: [entities_resources_replacement.amxx] Connection was succesfully created
L 04/24/2016 - 10:08:25: [entities_resources_replacement.amxx] Pair: [ models/p_deagl3.mdl ] [ models/p_deagl4.mdl ] has missing resources.
L 04/24/2016 - 10:08:25: [entities_resources_replacement.amxx] Pair: [ sprites/awp.spr ] [ sprites/awh.spr ] has missing resources.
L 04/24/2016 - 10:08:26: [entities_resources_replacement.amxx] You are running the latest version of this plugin.
Both the server and the FastDL http server have the old and new sprites in the sprites folder.
Attached Files
File Type: zip sprites_new.zip (20.4 KB, 128 views)
File Type: zip sprites_old.zip (19.6 KB, 139 views)

Last edited by axfalcon; 04-24-2016 at 02:53. Reason: added comment.
axfalcon is offline
axfalcon
Junior Member
Join Date: Apr 2016
Old 04-24-2016 , 03:53   Re: Entity Resources Replacement[ V 1.4 ]
Reply With Quote #156

Found something. In the cstrike/sprites folder there are a few files such as: weapon_awp.txt.

Inside those files there are sprite resource references that locate which sprite to use and where, and there seems to be a files for each weapon, as well as hud.txt and observer.txt.

Next I am to attempt a resource replacement of these text files.
axfalcon is offline
axfalcon
Junior Member
Join Date: Apr 2016
Old 04-24-2016 , 07:02   Re: Entity Resources Replacement[ V 1.4 ]
Reply With Quote #157

No luck however, my server is now uploading the .spr and .txt files to the clients cstrike_downloads/sprites folder because I added the custom_weapon_hud_sprites.amxx plugin and it has the following line of code:

Code:
new MsgIndexWeaponList;  

public plugin_precache()  
{  
    precache_generic( "sprites/weapon_ArkFlare.txt" );  
    precache_generic( "sprites/640hud19.spr" );  
    precache_generic( "sprites/640hud20.spr" );  
    precache_generic( "sprites/weapon_awh.txt" );  
    precache_generic( "sprites/sniper_scoph.spr" );  
}
axfalcon is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 04-24-2016 , 07:26   Re: Entity Resources Replacement[ V 1.4 ]
Reply With Quote #158

Okay, I'll work on a way to replace weapon hud sprites automatically. Give me some time.
Also, you have some configuration issues:
PHP Code:
L 04/24/2016 10:08:25: [entities_resources_replacement.amxxPair: [ models/p_deagl3.mdl ] [ models/p_deagl4.mdl has missing resources.
L 04/24/2016 10:08:25: [entities_resources_replacement.amxxPair: [ sprites/awp.spr ] [ sprites/awh.spr has missing resources
This means that one of the resources(or both) does not exists on the server.
__________________

Last edited by HamletEagle; 04-24-2016 at 07:28.
HamletEagle is offline
axfalcon
Junior Member
Join Date: Apr 2016
Old 04-24-2016 , 07:51   Re: Entity Resources Replacement[ V 1.4 ]
Reply With Quote #159

Thank you. That is really awesome!

I found this to learn, though it will take me a few weeks I presume. However if the code helps, yay.

http://forums.alliedmods.net/showthread.php?t=175632
axfalcon is offline
axfalcon
Junior Member
Join Date: Apr 2016
Old 04-24-2016 , 10:06   Re: Entity Resources Replacement[ V 1.4 ]
Reply With Quote #160

TFR (To Future Readers) this may be of use:

from http://www.amxmodx.org/api/ns/ns_set_ps_sprite

Quote:
ns_set_ps_sprite

Syntax

native ns_set_ps_sprite(RawPS:system, const sprite[]);
Description

Sets the sprite to use for the particle system
-
You do NOT have to precache the sprite, BUT
the sprite must obviously be on the client to
display.
Currently I can get the sprite to upload to client's cstrike_downloads folder but just need a way for a plugin to tell the client PC to use the sprites from that folder and not the files from the default cstrike folder.

Last edited by axfalcon; 04-24-2016 at 10:08.
axfalcon is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 04:04.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode