can someone help me with one thing on a sniper rifle

Need some nice Mods? Here, you are right!
sXs-sketchpad
Experienced
Posts: 143
Joined: Sun Mar 29, 2020 3:37 am

can someone help me with one thing on a sniper rifle

Post by sXs-sketchpad »

hi all me again i wanted to ask if someone could help me out i want to use a sniper rifle on my server but i would like the ammo the gun has from 100 to 250 if anyone has the time would someone be able to help me i would like to know how to do it myself but i dont really understand most of the coding side of things thanks
You do not have the required permissions to view the files attached to this post.
Image
User avatar
OjitroC
Godlike
Posts: 3745
Joined: Sat Sep 12, 2015 8:46 pm

Re: can someone help me with one thing on a sniper rifle

Post by OjitroC »

The first thing to do is to morph the current DSFRiflev7z into another package :
in the Editor console (the text box at the bottom of the Editor window) type in

Code: Select all

obj load file=DSFRiflev7z.u package=AnotherDSFRilfev7z
replacing AnotherDSFRilfev7z with the name you want to use - when I tried it I used DSFRilfev7zRev as the new name so if you want to use that just type "package=DSFRilfev7zRev" without the quotes and hit return.

Undock the ActorBrowser and then redock it and the new Package should appear in the bottom pane where the packages are listed with tick boxes - tick the box against DSFRilfev7zRev and hit the save button. If the new Package hasn't appeared, undock and redock the ActorBrowser again and it should appear.

Once the new package is saved, find it in the Actor Tree - so go Inventory->Weapon->TournamentWeapon and it should be there (it will be called DSFRiflev7z as that is the class within the package/file DSFRiflev7zRev) - highlight it and open the DefaultProperties (hit the appropriate button at the top of the browser). In the DefaultProperties go Weapon->PickUpAmmoCount and change 100 to 250. Make sure the box against the package is ticked and hit Save. You should now have a new version of the DSFRifle with the ammo in the gun set at 250.

Try this method out - if you run in to problems PM me and I can send you the package DSFRilfev7zRev that I created.

You wll also need to change the .int file for the rifle so rename the int to the name you have chosen for it and change

Code: Select all

Object=(Name=DSFRifleV7z.DSFRifleV7zMut,Class=Class,Metaclass=Engine.Mutator,Description="DSFRifleV7z")
Object=(Name=DSFRifleV7z.DSFRifleV7z_HUDMutator,Class=Class,Metaclass=Botpack.TournamentWeapon,Description="HUD Mute")
to

Code: Select all

Object=(Name=NewName.DSFRifleV7zMut,Class=Class,Metaclass=Engine.Mutator,Description="DSFRifleV7z")
Object=(Name=NewName.DSFRifleV7z_HUDMutator,Class=Class,Metaclass=Botpack.TournamentWeapon,Description="HUD Mute")
replacing NewName by the name you have chosen.
User avatar
Barbie
Godlike
Posts: 2911
Joined: Fri Sep 25, 2015 9:01 pm
Location: moved without proper hashing

Re: can someone help me with one thing on a sniper rifle

Post by Barbie »

That can also be solved by a small mutator, I think.
"If Origin not in center it be not in center." --Buggie
User avatar
sektor2111
Godlike
Posts: 6433
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

Re: can someone help me with one thing on a sniper rifle

Post by sektor2111 »

I don't think is needed any connected "sub-package" but... a generic ServerActor boosting ammo and weapon's "MaxAmmo"...
Stages:
- Quickly set classes names with higher values using calls to "Class.default.XXX = Class.default.XXX * 3" (whatever);
- If this would not be enough for current map's charge (replacements done), call an Iterator for boosting current stuff in whatever "Auto State" allowing replacements to take place.

Optional - definition of certain user classes "Weapon" and "Ammo" for being boosted up or down in a configurable file, perhaps for 8 to 16 classes.

Notes: Probably changing default.class properties in lousy servers which are unable to purge garbage packages properly will return bigger and bigger values at each change of map, in such servers altered properties will stay screwed up for next loaded maps. Here would be needed hard-coded data instead of a multiplication.
User avatar
Barbie
Godlike
Posts: 2911
Joined: Fri Sep 25, 2015 9:01 pm
Location: moved without proper hashing

Re: can someone help me with one thing on a sniper rifle

Post by Barbie »

sektor2111 wrote: Fri Apr 22, 2022 11:46 am Notes: Probably changing default.class properties in lousy servers which are unable to purge garbage packages properly
:omfg:

I don't know what you mean… :loool:
"If Origin not in center it be not in center." --Buggie
sXs-sketchpad
Experienced
Posts: 143
Joined: Sun Mar 29, 2020 3:37 am

Re: can someone help me with one thing on a sniper rifle

Post by sXs-sketchpad »

its ok now i have it sorted someone from another clan did it for me
Image
User avatar
Que
Inhuman
Posts: 812
Joined: Mon Dec 09, 2019 5:49 am
Personal rank: ...

Re: can someone help me with one thing on a sniper rifle

Post by Que »

can you post the newly updated riffle mod here please for testing
*Join our Discord Here.*
Our mods - MVX , SSB , SmartWFL , UTCmds , BotCommands , Smart Stats , join/leave announcer , NoSmoke , UTLogin , BrightSkins , Server Tran…
*Our Servers
User avatar
sektor2111
Godlike
Posts: 6433
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

Re: can someone help me with one thing on a sniper rifle

Post by sektor2111 »

Barbie wrote: Fri Apr 22, 2022 9:07 pm
sektor2111 wrote: Fri Apr 22, 2022 11:46 am Notes: Probably changing default.class properties in lousy servers which are unable to purge garbage packages properly
:omfg:
I don't know what you mean… :loool:
Do you need a memory refresh concerning map 3072 when somebody was claiming that Kralls are going changed and in next map they were staying screwed up ? :loool: FYI in client, doing changes at default properties concerning by example HealthVials aspect, when player is still connected to server, in next map they will remain in the same format. Proof ? Play map Purgatory Purgatorium in MonsterGamingServer and then... pick another map having HealthVials - see what I mean... because it looks like you really have an issue with understanding "defaultproperties" of a class vs of an actor, and what's going on when class is held in memory post server-travel at once with newer default properties.

PS: Oh, Yes, you know veeery well what I mean... because let me guess... you have updated server to 469 exactly because Garbage Collector was your public enemy giving you more headaches than expected due to references created and not removed.

Back to the thing: Here is needed one of solutions:
- creating a subclass of said package with new properties;
- adjusting properties for said package;
- recreating a conformed package with small changes but nothing added or removed from initial package structure.

As user said - problem was solved, there is no need for further discussions.