Hello There, Guest! Login Register


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Bounty/Request: Increase schematic size to 10k (Partial Claim!)
#1
Lightbulb 
(UPDATE: we have successfully applied a hack to alllow this server side, but client side its still a no go, 1/2 the Bounty is still up as the full solution has not yet been found, we need a Client Side solution for this issue)

What it says, we have modified the game files to try to attempt to do this but with no luck,

we suspect it has something to do with an actual setting inside tre files as anything we do server side does nothing.

We hereby offer a bounty of $50, $25, to the first person that posts here (and we can successfuly replicate it) the code/file changes required to excecute this UI modification on the client side (server side is done).

Heres what we know so far:
Identified server side files and modified them:

UI file to modify is possibly this one:
ui_craft_customize.inc
Located in:

Patch_12_00.tre

bin/scripts/object/draft_schematic/structure/component/structural_module.lua
factoryCrateSize = 10000,

src/server/zone/objects/factorycrate/FactoryCrate.idl
maxCapacity = 10000;

src/server/zone/objects/manufactureschematic/ManufactureSchematic.idl
manufactureLimit = 10000;

src/templates/intangible/DraftSchematicObjectTemplate.cpp
factoryCrateSize = 10000;

However this modification also requires changes CLIENT side to support these features, that includes modifying the following files on the following TREs

Every IFF file inside:
object/draft_schematic/ (data_other_00.tre)

Specifically these 6 Files in particular:
object/draft_schematic/base/shared_base_draft_schematic.iff
object/draft_schematic/base/shared_draft_schematic_default.iff
object/draft_schematic/base/shared_missing_schematic_substitute.iff
object/manufacture_schematic/shared_generic_schematic.iff
object/manufacture_schematic/base/shared_base_manufacture_schematic.iff
object/manufacture_schematic/base/shared_manufacture_schematic_default.iff

And Possibly these:
ui/ui_craft.inc
ui/ui_craft_assembly.inc
ui/ui_craft_customize.inc
ui/ui_craft_draft.inc
ui/ui_craft_experiment.inc
ui/ui_craft_option.inc
ui/ui_craft_summary.inc
object/intangible/base/shared_base_intangible.iff
object/intangible/base/shared_intangible_default.iff
object/object/base/shared_base_object.iff
object/object/base/shared_object_default.iff
 
Reply
#2
In

\server\MMOCoreORB\src\server\zone\objects\player\sessions\crafting\CraftingSessionImplementation.cpp

Find these lines:
Code:
    if (schematicCount < 0 || schematicCount > 1000)
        schematicCount = 1000;

Which basically says if the schematic count is under 0 or over 1k, set to 1k.

You can remove/comment out both lines and it should work.

Researched this while working at SWG Andromeda in part of the 'factory crate 1000 cap' issue, but I don't think we changed that there yet.
 
Reply
#3
(2017-05-24, 12:43 AM)Valkyra Wrote: In

\server\MMOCoreORB\src\server\zone\objects\player\sessions\crafting\CraftingSessionImplementation.cpp

Find these lines:
Code:
    if (schematicCount < 0 || schematicCount > 1000)
        schematicCount = 1000;

Which basically says if the schematic count is under 0 or over 1k, set to 1k.

You can remove/comment out both lines and it should work.

Researched this while working at SWG Andromeda in part of the 'factory crate 1000 cap' issue, but I don't think we changed that there yet.

Thanks for the tip! will test this right away, this TOTALLY makes sense, no wonder everything we changed did nothing, this explains it all!

Thank you!
 
Reply
#4
Still no dice :/

[Image: 8961b69ee95b13fab25b31b70981ef54.png]

However we feel like were on the right track, and close!

We modified the following files as a test:

[Image: aa4494f229248ae7b3ae3575d254f3c3.png]

Edits can be seen here:

https://github.com/SWGShadowFire/ShadowF...30edb9e7ca

There must be something else were missing, maybe a hard limit on the client itself?
 
Reply
#5
Still no dice?
 
Reply
#6
(2017-05-24, 02:12 AM)Phoenix Wrote: Still no dice?

ok updates:

unrelated but equally important:
Casually while looking I found the colors removal subroutine, which was subsequently removed with brutal efficiency (whomever thought removing colors from crafted items was "a god idea" should be shot lol), im glad to have colors back just like the old days, one more step towards proper pre-cu original SWG

To do that just comment these lines in CraftingSessionImplementation.cpp:

//Remove color codes
String newName = name;
// while (newName.contains("\\#")) {
// int index = newName.indexOf("\\#");
//  String sub = "\\" + newName.subString(index, index + 2);
// newName = newName.replaceFirst(sub,"");
// }

Dont comment the second line or ull break the script

That said however there has been progress on the main issue!!!!

Essentially the problem is this, theres a check somewhere client side that does not allow the UI to set anything further than 1k on that box, so what happens is even tho everything server side is working, the client overwrites the final number with its 1k limit.

So what i did to test this theory is after i modified the aforementioned files, i changed this line:

[Image: a6f73de80d9e099f827e3f25de87ebf4.png]

This is the part where what ever setting you have placed as the max schematic count gets overriden and replaced by what ever is on the UI, since the ui does not allow any number over 1k then essentially this will always be 1k

so after doing this, and changing this other line (manually/forcibly setting it at 10k):

[Image: f026a8ded0679c1c032109f5fd92368a.png]
 
Bingo!

[Image: 57a3c81a9f5de1c37e7be1c7c7703c78.png]

10k crates!

The problem now is the UI, we cant find where in the ui code is this 1k limitation

For now, we have essentially hard set schematics at 10k, id rather have them hard coded at the max than be unable to set it past 1k.

However for "correctness" sake if anyone has any ideas how to fix this in the UI it would definitely help out to bring this fix out the "proper" way.
 
Reply
#7
I am relatively new to code (thank god I have Phoenix and Valkyra to help me build SWG Andromeda), but if I am not mistaken, then the UI should something related to strings. I'm glad we cracked your problem though.
 
Reply
#8
(2017-05-24, 02:54 AM)Violet915 Wrote: I am relatively new to code (thank god I have Phoenix and Valkyra to help me build SWG Andromeda), but if I am not mistaken, then the UI should something related to strings. I'm glad we cracked your problem though.

Yeah Valkyras guideance was invaluable, it put us on the right path.

Now if only we can figure out how to fix that ui..... haha Big Grin
 
Reply
#9
Ok for the sake of progress, heres all the documented changes to perform this mod

A list of the files changed, how they were changed and their locations, these 2 images should provide all the info to replicate this on your servers

Engine Mod to support 100k Crates:
[Image: 502380e4a3c55ed96126aab17bebf676.png]
[Image: b3cce9ff99bf7ab88824b234a865e96e.png]

Hard Coded hack that enables you to test/use these features while a proper UI modification is discovered:
[Image: 5603804c388081062912a7ac8fd638f1.png]

I hope thats helped someone.

All thats missing now its the UI, well keep looking, any help is apreciated!

Screenie of 100k crate/schem limits in action:
[Image: 8d9e3199f85cf2340f206b59c243f95b.png]
 
Reply
#10
Ok, I've researched it a little bit more...

What you did commit should work for now, but like you said it's not a completely non-hackish fix.

However, I have looked into it a bit more, and it does seem it's client controlled from a client to server sent packet, which originates from the client, so the 1k cap would have to be within the exe itself.

You *may* be able to change that in ASM-level code, or an easier fix...

Open:
src\server\zone\packets\object\CraftingCustomizationCallback.h

You can see in the parse method, it will parse a variable called "schematicCount", which should be an integer.

Now you have a few options, you can either multiply that when it's parsed, or later down the line in "run()" when the pointer is actually called to customize in the session pointer.

For example..

schematicCount = message->parseInt();

Could become:

schematicCount = (message->parseInt()) * 100;

Which should effectively set the new limits from 100-100,000.
 
Reply
  



Forum Jump:


Browsing: 1 Guest(s)