March 29, 2024, 03:41:09 pm
Username:

Password:

Topic: Container Filter : Statted / Unstatted  (Read 2182 times)

abysse

  • Posts: 67
    • View Profile
Container Filter : Statted / Unstatted
« on: March 08, 2023, 04:46:40 am »
That kind of feature would be really cool, and hopefully not too time consuming to do ?

To avoid interface changes maybe a shortcut like Shift + take all : you take everything unstatted, in fact only one part of this suggestion would be enough to make a crazy farmer really, really happy. Thanks !

Slowhand

  • Posts: 278
  • Go for the eye, Boo! Go for the eyes!
    • View Profile
Re: Container Filter : Statted / Unstatted
« Reply #1 on: July 23, 2023, 02:32:09 pm »
Messing with interface is not optimal as it requires engine code changes + lot more...

However the engine was designed with the flexibility to achieve what you want on Angel Script part in mind, there is a similar solution for bottle caps, dollars and 'real bottle caps' (whatever those mean), should be on top always, if the container/merchant/whatever has it.

So on the AS part, devs could for example sort the items in container so that statted weapons and armor are on top.

Would such a solution animate a crazy farmer's mouth into a semi circle?

Slowhand

  • Posts: 278
  • Go for the eye, Boo! Go for the eyes!
    • View Profile
Re: Container Filter : Statted / Unstatted
« Reply #2 on: July 24, 2023, 02:09:15 pm »
So, here is a solution that is ready to be tested. Before you get your hopes up, this needs to be approved and integrated into S4 by Reloaded Team, before you can use the features live. (If they decide to do so), however you can contribute by testing it in a test environment that is compatible (more or less) with Reloaded S3+
Once testing is done, I will publish the code on github in a change list, they can work with that.

Edit: updated, added sorting to include separators and deteriorated items
Download the following test environment at: https://drive.google.com/file/d/1vdDnWAPBBqett7MW9_W8NWPQl-mn5KTN/view?usp=sharing

So, after downloading the test environment above, issue the following steps to test the solution for your suggestion/request:
(Note: if windows asks for firewall or windows defender about port/application, choose whatever, because you use localhost only, I always allow it, just in case unforeseen bugs.)

- Find and run Server locally - ../PReloaded/Server/server.exe
- Find and run Client locally - ../PReloaded/Client/ClientDX.exe
- Note: If issues with client, delete cache first and use config (do NOT run updater)

- Create new character.
- Note: You can press Right click to move, and left click to interact. Dig up the FOCLassic tutorial in workshop and check section 5 for more hotkey and QoL changes. ( https://forum.fonline-reloaded.net/index.php?topic=13694.msg111095#msg111095 or https://fodev.net/forum/index.php/topic,30344.msg263172.html#msg263172 )
- Exit cave, and enter Tutorial. (If you missed it you can go back from world map, it should be a visible public location.)
- Get Admin access to your account with the following command:
  • ~getaccess admin admin
- Open Fixboy 2000 (crafting window) by pressing "U".
- Click on Shotgun, you should see 1 x Wood, 5 x Metal Parts in red.
- To get the materials type the commands, without the double quotes ( " ) and also please note the first character for command is ( ` ) on English keyboard the key to the left of "1" on top left side. :
  • `items wood
  • `give 286 10
  • `items metal_pa
  • `give 1804 50
- Now open crafting again with "U" and check for Shotgun again, if you see this in orange, it means you are not standing close to a workbench, just go to the North-West building behind Captain Jason Stone at tutorial gate zone entrance and click on workbench.
- You can Ctrl  + Right click on building and select "Teleport" to get there faster.
- Craft the Shotguns again, use the ALL button to craft all 10 at once.
- Now find the Rotgut Still in the building with a robot near entrance. (don't forget to rip off the arms of the robot for shits, giggles and some electronic parts)
- Open the Still and put your everything you have in it in random order, try to put 1 common 1 quality item and then reverse, basically, do not put them in a sorted order yourself, let the code do it's thing.
- Repeat this process but now make some other weapon or armor that is available to you and put some in still, but keep some to barter.
- Trade the trader near the workbench, just give him free stuff.
- When trading observe the order of your items in inventory and the order of their inventory regarding common or better (with bonus stat) weapons/armor.
A little extra:
- Go out of zone and enter 'The safe place' nearby or alternatively use command to teleport there:
  • `maps start
  • `tp 1 0

- Find the Altruist there, a hooded figure that gives free XP and Cash and whatever.
- Gain experience or use books (`items book) and (`give [book_pid] 10) without parenthesis, until you have 125+ lockpick and barter.
- Gain support perks either here or visit the respective quest givers in New Reno and Broken Hills for Negotiator and Treasure Hunter perks.
- Go back to tutorial zone with:
  • `maps lander
  • `tp 2 0
- Talk to Albert the tool maker again and barter with him.
- Having Negotiator see the order of the items again and notice a slight difference. (you must have multiple bonus stat items to see effect, possibly 1 superior, 2 quality or improved, if needed craft another set of 10 items, to better testing it helps if it's not Shotgun but other weapon)
- Repeat process with Rotgut Still (the reason you put stuff there, is because it does not auto-garbage and random replace with stuff as containers to in tutorial zone)
- See the slight difference in item order in container.

Report back your findings, post the difference between no support perk, negotiator and treasure hunter so I know you didn't just skipped most stuff and tested properly.
If you encounter something strange related to inventory, might be a bug, except the Inventory Tracker which is buggy atm, the right side notification icons that appear when you get or loose items or enter map.
I have not tested with items with professions, if you have a lot of time and willingness, you might get the professions and craft some heavy shit and see if any difference, I doubt it but you never know where you find strange behavior/bugs.

Note:
You are testing specifically the features that you requested for. This test environment is a bit different, but probably still very compatible with Reloaded S3+. So solution will be posted here and the Reloaded team can decide if they add it or not. I do not have any say in those things, all I do is make it easy for them to solve/add feature, etc.
« Last Edit: July 24, 2023, 09:24:29 pm by Slowhand »

Slowhand

  • Posts: 278
  • Go for the eye, Boo! Go for the eyes!
    • View Profile
Re: Container Filter : Statted / Unstatted
« Reply #3 on: July 24, 2023, 09:33:57 pm »
Update for testers: (if any)

Added separators between Rare > Regular > Broken weapons and armor.

Behavior in inventory should be:

--- Top ---
Caps
Rare Weapons and Armors
Separator1: Red/Blue/Green Condoms
Regular Weapons, Armor and all other stuff
Separator2: Gold Locket, Necklace, Black/Red CoC Badge, Fuzzy Painting
Broken Weapons and Armors
 --- Bottom ---

When bartering players own inventory will use Regular > Broken > Rare (with same separators) because I assume that would be sell order...

The 2 support perks allow to sort the rare weapons/armors also by rarity, putting Unique front and Quality last, except when bartering.

Slowhand

  • Posts: 278
  • Go for the eye, Boo! Go for the eyes!
    • View Profile
Re: Container Filter : Statted / Unstatted
« Reply #4 on: July 27, 2023, 07:03:20 am »
Solution submitted, change log here: https://github.com/Sasabmeg/FOnline-BraveNewWorld/commit/14589df5ecf2e9fc02334b013e428db764ae3ae1

There were no errors reported during testing, gl.