Bounty/Request: Increase schematic size to 10k (Partial Claim!)

XionicFire

New Member
Joined
May 23, 2017
Messages
46
(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
 

Valkyra

Member
Joined
Aug 31, 2010
Messages
211
RE: Bounty/Request: Increase schematic size to 10k (PayPal)

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.
 

XionicFire

New Member
Joined
May 23, 2017
Messages
46
RE: Bounty/Request: Increase schematic size to 10k (PayPal)

Valkyra said:
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!
 

Phoenix

Moderator
Staff member
Moderator
Joined
Sep 25, 2010
Messages
235
RE: Bounty/Request: Increase schematic size to 10k (PayPal)

Still no dice?
 

XionicFire

New Member
Joined
May 23, 2017
Messages
46
RE: Bounty/Request: Increase schematic size to 10k (PayPal)

Phoenix said:
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:



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):


 
Bingo!



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.
 

Violet

Mouthy Brit
Joined
Aug 1, 2015
Messages
7
RE: Bounty/Request: Increase schematic size to 10k (PayPal)

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.
 

XionicFire

New Member
Joined
May 23, 2017
Messages
46
RE: Bounty/Request: Increase schematic size to 10k (PayPal)

Violet915 said:
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 :D
 

XionicFire

New Member
Joined
May 23, 2017
Messages
46
RE: Bounty/Request: Increase schematic size to 10k (PayPal)

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:



Hard Coded hack that enables you to test/use these features while a proper UI modification is discovered:


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:
 

Valkyra

Member
Joined
Aug 31, 2010
Messages
211
RE: Bounty/Request: Increase schematic size to 10k (PayPal)

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.
 

XionicFire

New Member
Joined
May 23, 2017
Messages
46
RE: Bounty/Request: Increase schematic size to 10k (PayPal)

Valkyra said:
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.
Wow! nice idea to packet sniff, we hadnt thought of that!

This fix is definitely a step in the right direction, at least we now have some granularity, the problem now is its going to be confusing for the players, but at least were getting really close.

Regarding the client, we snooped around the client .tre files, the schematic limit call is somewhere in the ui_craft_customize.inc file, located in patch_12_00.tre file

specifically here:
on line 52:

sliderLimit='comp.right.comp.manf.sliderLimit'
textboxLimit='comp.right.comp.manf.textboxLimit'

aparently that sets the limit for the text and slider but we cannot find where that variable points to weve searched everywhere, the file calls for that variable but its not stated anywhere!

Were still looking

Ill test ur mod and let you know if it works
 

XionicFire

New Member
Joined
May 23, 2017
Messages
46
RE: Bounty/Request: Increase schematic size to 10k (PayPal)

I can confirm your mod works PERFECTLY!

No issues on the server.

Its for sure another step in the right direction, as said its not intuitive for players but at least now they have a way to controling size with some granularity

Were still trying to find where in the client is this variable, its good to know its not a server thing anymore, at least we can confirm that.
 

Trakaa

New Member
Joined
Jul 31, 2017
Messages
6
RE: Bounty/Request: Increase schematic size to 10k (PayPal)

XionicFire said:
Valkyra said:
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.
Wow! nice idea to packet sniff, we hadnt thought of that!

This fix is definitely a step in the right direction, at least we now have some granularity, the problem now is its going to be confusing for the players, but at least were getting really close.

Regarding the client, we snooped around the client .tre files, the schematic limit call is somewhere in the ui_craft_customize.inc file, located in patch_12_00.tre file

specifically here:
on line 52:

sliderLimit='comp.right.comp.manf.sliderLimit'
textboxLimit='comp.right.comp.manf.textboxLimit'

aparently that sets the limit for the text and slider but we cannot find where that variable points to weve searched everywhere, the file calls for that variable but its not stated anywhere!

Were still looking

Ill test ur mod and let you know if it works
Could you not just force the line to whatever value you wanted?

IE:

sliderLimit='10000'

textboxLimit='10000'
 

XionicFire

New Member
Joined
May 23, 2017
Messages
46
RE: Bounty/Request: Increase schematic size to 10k (PayPal)

Trakaa said:
XionicFire said:
Valkyra said:
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.
Wow! nice idea to packet sniff, we hadnt thought of that!

This fix is definitely a step in the right direction, at least we now have some granularity, the problem now is its going to be confusing for the players, but at least were getting really close.

Regarding the client, we snooped around the client .tre files, the schematic limit call is somewhere in the ui_craft_customize.inc file, located in patch_12_00.tre file

specifically here:
on line 52:

sliderLimit='comp.right.comp.manf.sliderLimit'
textboxLimit='comp.right.comp.manf.textboxLimit'

aparently that sets the limit for the text and slider but we cannot find where that variable points to weve searched everywhere, the file calls for that variable but its not stated anywhere!

Were still looking

Ill test ur mod and let you know if it works
Could you not just force the line to whatever value you wanted?

IE:

sliderLimit='10000'

textboxLimit='10000'
Yup we did, it was the first thing we tried, but no dice, when you tried to set it higher than 1000, the server would theoretically let you but the client gives you an error before it even sends anything to the server, so somewhere in the tre file is a hardcoded limit for 1000 on the crafting session
 

Trakaa

New Member
Joined
Jul 31, 2017
Messages
6
RE: Bounty/Request: Increase schematic size to 10k (PayPal)

XionicFire said:
Trakaa said:
XionicFire said:
Valkyra said:
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.
Wow! nice idea to packet sniff, we hadnt thought of that!

This fix is definitely a step in the right direction, at least we now have some granularity, the problem now is its going to be confusing for the players, but at least were getting really close.

Regarding the client, we snooped around the client .tre files, the schematic limit call is somewhere in the ui_craft_customize.inc file, located in patch_12_00.tre file

specifically here:
on line 52:

sliderLimit='comp.right.comp.manf.sliderLimit'
textboxLimit='comp.right.comp.manf.textboxLimit'

aparently that sets the limit for the text and slider but we cannot find where that variable points to weve searched everywhere, the file calls for that variable but its not stated anywhere!

Were still looking

Ill test ur mod and let you know if it works
Could you not just force the line to whatever value you wanted?

IE:

sliderLimit='10000'

textboxLimit='10000'
Yup we did, it was the first thing we tried, but no dice, when you tried to set it higher than 1000, the server would theoretically let you but the client gives you an error before it even sends anything to the server, so somewhere in the tre file is a hardcoded limit for 1000 on the crafting session
I am betting that it is actually a var inside the client exe. >.<

If that is the case....ollydbg time. Maybe CheatEngine too.
 

Trakaa

New Member
Joined
Jul 31, 2017
Messages
6
Bad news. I had a peek at a certain source code, and I found some things. The client definitely forces the maximum value at 1000 in addition to running a check to make sure it is kept at 1000. Other than recompiling the client, making a DLL injector, or modifying the byte code of the exe directly I am at a loss as to how to make this work.

Would a SUI box that essentially looks like the crafting customization window work? I admit I am woefully ignorant on the SUI side of things.
 

Trakaa

New Member
Joined
Jul 31, 2017
Messages
6
Good News.

I have found the relevant entries in the .exe and am able to make the changes. They work 100%. I can either provide the exe to you or give you instructions on how to modify it.

Here is a link of it in action. https://webmshare.com/play/yYPOB
 

Phoenix

Moderator
Staff member
Moderator
Joined
Sep 25, 2010
Messages
235
Trakaa said:
Good News.

I have found the relevant entries in the .exe and am able to make the changes. They work 100%. I can either provide the exe to you or give you instructions on how to modify it.

Here is a link of it in action. https://webmshare.com/play/yYPOB
What's the offset?
 

Trakaa

New Member
Joined
Jul 31, 2017
Messages
6
Phoenix said:
Trakaa said:
Good News.

I have found the relevant entries in the .exe and am able to make the changes. They work 100%. I can either provide the exe to you or give you instructions on how to modify it.

Here is a link of it in action. https://webmshare.com/play/yYPOB
What's the offset?
There are four of them to worry about at:

00D17290
00D172CA
00D172DB

00D17693

Each location references '3E8' which is hex for 1000. In my example, I simply changed '3E8' to '2710' which is hex for 10000.
 

XionicFire

New Member
Joined
May 23, 2017
Messages
46
Trakaa said:
Phoenix said:
Trakaa said:
Good News.

I have found the relevant entries in the .exe and am able to make the changes. They work 100%. I can either provide the exe to you or give you instructions on how to modify it.

Here is a link of it in action. https://webmshare.com/play/yYPOB
What's the offset?
There are four of them to worry about at:

00D17290
00D172CA
00D172DB

00D17693

Each location references '3E8' which is hex for 1000. In my example, I simply changed '3E8' to '2710' which is hex for 10000.
That is awesome Trakaa! thank you so much!, we use a custom modded EXE file for /screenshots folder and 60FPS among other things, if i get you a copy of it would you be willing to do this mod for us?

We have since increased the limit to 100,000 with no issues for crates, but were also having issues with the max credit limits of the vendors and bazaar set at 99,999,999 if youd be willing to help us set that as well to 999,999,999 wed be interested in make it worth your while, it appears to also be EXE side

Thanks for this awesome feedback!
 
Top Bottom