Micro Sensor Suite and the Weighed Average Formula

A board for general discussion of the various SWG Emulators

Moderator: Forum Moderator

Post Reply
Kookoy
Novice Crafter
Posts: 18
Joined: Sun Sep 15, 2013 4:50 pm

Micro Sensor Suite and the Weighed Average Formula

Post by Kookoy » Mon Jan 27, 2014 6:34 pm

Hello all,

I play on the SWGCanon server, it's a PreCU server with capped resources. I hope this is the right place to ask this, the General Crafting forum looks to be closed.

My results for a crafted Micro Sensor Suite aren't matching the numbers I get from the formula, however they look to be correct up until the final build.

As you know the MSS takes its own resources plus an Electronics GP Module, Control Unit, and Energy Distributor. Here are my numbers:

Electronics GP Module: Quality 4.921, 98%. The quality actually reads as "4" but I'm using the fractions for personal records. I've read that fractions do count, not sure to how many decimal places, is this correct?

Control Unit: Quality 4.928 (read as 4), 98%.

Energy Distributor: Quality 4.922, 98%

I've calculated my Micro Sensor Suite should come to a Quality of 4.3439, 87%; this is not factoring in the other subcomps but just the MSS resources. On my initial assembly and having experimented to the maximum (87%), everything matches the numbers I get from the formulas. However on the final build the quality reads as 18%.

I'm not sure if the MSS calculates it's own values, then adds the values of the other subcomps (like a crafting station would, correct me if I'm wrong). If that is right, the quality should be 19.11 (4.3439 + 4.921 + 4.928 + 4.922).

Ii hope this is enough info, thanks.

User avatar
Savacc
Architect & Shipwright Forum Moderator
Posts: 1211
Joined: Mon Mar 26, 2007 9:45 pm
Location: Central Oregon

Re: Micro Sensor Suite and the Weighed Average Formula

Post by Savacc » Tue Jan 28, 2014 1:13 am

I dont know anything about the SWGCannon server, are you using SWGEmu code?

If whoever wrote the code is following SOEs, then yes the decimals do matter. On Crafting Stations they figured out to 6 decimal places.

The Micro Sensor Suites, the rating on them goes up to 20. I always assumed, like you have, that this rating took the ratings of the subcomponants, and added another possible +5 for its own resources. But if you say the numbers are not adding up that way, then it might not be as simple as we hoped. Maybe it is being calculated differently.

Then there is the issue that this is an emulator, trying to recreate SOE code. Maybe you have found a "bug".

I play on SWGEmu. There, Crafting Station ratings are not used in the crafting formulas. So I have not made any crafting stations with subcomponants. I cant say how they are working there.

I am not sure I have been helpful to you, but if you want to keep the discussion going, I would be willing to test things on the SWGEmu servers and see how crafting stations, MSS and such are behaving there.

Kookoy
Novice Crafter
Posts: 18
Joined: Sun Sep 15, 2013 4:50 pm

Re: Micro Sensor Suite and the Weighed Average Formula

Post by Kookoy » Tue Jan 28, 2014 3:30 am

Hey Savacc, thanks for the quick reply.

Yes SWGCanon, aka the Tarkin server, is running the SWGEmu code.

I am running some numbers/making new subcomps to test and will let you know what I come up with.

You say the ratings don't factor in, hmm. TBH I assumed the higher ratings helped with assembly and/or experimentation results. I haven't read much of the Emu forums but will try to do so.

User avatar
Savacc
Architect & Shipwright Forum Moderator
Posts: 1211
Joined: Mon Mar 26, 2007 9:45 pm
Location: Central Oregon

Re: Micro Sensor Suite and the Weighed Average Formula

Post by Savacc » Tue Jan 28, 2014 7:01 pm

start here http://www.swgemu.com/forums/showthread.php?t=45284
This thread looks at the code and tries to explain it.

You will find lots of threads on whether crafting stations should have an affect on crafting, my name will be in every one of them. :mrgreen:

EDIT: I just noticed you are talking weighted average formulas. MSS use steel and are CD 50, OQ 50, right? (going off memory here) In pre-CU resource caps are not weighted. That did not happen till the CU. So if you are figuring your steel CD cap at 650 (stat/650 * 1000) then, unfortunately, you are doing it wrong. That is the way it was done in the CU and NGE, but not pre-CU.

So, take all adjustments for resource caps out of your formulas for pre-CU crafting.

Does that fix your problem?

Kookoy
Novice Crafter
Posts: 18
Joined: Sun Sep 15, 2013 4:50 pm

Re: Micro Sensor Suite and the Weighed Average Formula

Post by Kookoy » Wed Jan 29, 2014 12:04 am

Thanks for pointing me to that link, it's a great place to start. I will have to do some reading on the SWGEmu forums.

I've made a critical error when coming up with the Quality, or rating, of the subcomps but first in regards to your comments about weighted resources: Are you sure resources weren't capped in PreCU? I didn't play after the CU so I wouldn't know about that or the NGE. I distinctly remember Lokian Wild Wheat and Herbivore Meat having PE caps of 700 (I was a doctor). From what I've read, Basilisk doesn't have caps, I haven't played there so cannot confirm. But I do believe Tarkin is using capped resources, it's been mentioned in their forums and nothing suggests otherwise.

In my original post, and calculations, I was figuring the rating as WAR*5, as 5 is the max rating for a subcomp (or is it 4.999998?). But I did not take into account that subcomps are rated from -5 to +5 (I think the technical term is a brainfart).

I believe the correct formula to be (WAR*10)-5; so A 100% effective result would result in 5, a 50% in 0 and 0% in -5.

Here's the new numbers for my comps:

Control Unit 4.855161290322581
Elec GP Module 4.842307692307692
Energy Dist 4.844444444444444
MSS 3.860692460881935

which gives me a Quality rating of 18.40260588795665, or a vague "18" on the actual schematic.

I'm happy to stick with this unless you see anything wrong with it.

Kookoy
Novice Crafter
Posts: 18
Joined: Sun Sep 15, 2013 4:50 pm

Re: Micro Sensor Suite and the Weighed Average Formula

Post by Kookoy » Wed Jan 29, 2014 1:28 am

I'm having a problem with the crafting station now, the end result is 41.89 when my numbers say it should be 41.81.

I won't get into my numbers as I'd like to hear what you have say about my previous post but I do have a few questions.

On the initial Assembly, it doesn't matter if you get 'Great' or 'Amazing', is that right? For example, a resource with the required stat at 990 would yield 29.5515% initial assembly percentage whether it got a great or amazing.

You've said that crafting stations are figured to 6 decimal places, does that go for the subcomps as well? Is the last digit rounded?

Another thought is that I should leave the Unit Integrity alone, as I've been putting leftover points into that, though it bears no purpose. I know in armor for example, if you experiment in special effectiveness it will bump the base effectiveness up as well (or maybe that's the other way around). But even then it should rise about the Max Experimental Percentage.

Thanks

User avatar
Savacc
Architect & Shipwright Forum Moderator
Posts: 1211
Joined: Mon Mar 26, 2007 9:45 pm
Location: Central Oregon

Re: Micro Sensor Suite and the Weighed Average Formula

Post by Savacc » Wed Jan 29, 2014 1:49 am

Yes, just about every resource has "caps". That has always been true and has not changed whether pre-CU, CU, NGE, Live, Emu or any other version of SWG. What changed was that in the CU and NGE, the Weighted Average Result (WAR) for resources included an adjustment for resource caps. The formula is/was:

WAR = actual stat / cap for stat * 1000

So, for example, steel which is capped at 650 for CD, a steel with 640 CD instead of being 640 in the WAR would be:
640/650 * 1000 = 984.6153 and would make a far, far better MSS for you.

It sounds like you were not doing that anyway and I am just muddying the picture for you, so just kind of ignore me. :mrgreen:

Your error does seem to be figuring the rating as 1-5, it is -5 to +5, or -20 to +20 for the MSS. The +4.999998 that I talk about in my guide is because of the rounding bugs in SOE's game. The Emu should be free of those bugs.

Glad I could help, if I did :mrgreen: Any other questions, comments, gripes you might have, feel free to come by. It gets kind of lonely here sometime. I keep checking these forums. Most of the time I just remove spam posts.

EDIT: You posted as I was posting.
A great or amazing assembly will not change how high your product can be experimented to for ONE line of experimentation. Getting more amazings then greats, helps you get more "boxes" to experiment a second or third line of experimentation.

However, in the Emu, there is a difference in a great and amazing success in Assembly. It does not allow a higher experimented result though.

SOE there was some rounding of the last digit. I can not say what the Emu is doing though.

It should not matter if you put points into a second line of experimentation or not.

Another Edit:
The difference between an amazing success and great success is in this bit of code
if(assemblyResult == CraftingManager::AMAZINGSUCCESS)
return 1.05f;
float result = 1.1f - (assemblyResult * .1f);
return result;
/*
else
return 1.0f;*/
}
float CraftingManagerImplementation::getAssemblyPercenta ge(float value) {
float percentage = (value * (0.000015f * value + .015f)) * 0.01f;
I do not speak C++ so I dont really understand what all of that says, but what I do get out of it is that amazing successes get a bonus 1.05f where all others get 1.0f
What that works out to, is that with near perfect resources you get a great success in assembly of 29%. If you get an amazing success instead, you get a 31% assembly.
This is not the way it was in SOE's game. On Live, great and amazing successes were identical (they would have both been 29%) for assembly.

Sobuno
Developer
Posts: 2589
Joined: Sun Mar 25, 2007 2:17 am
Contact:

Re: Micro Sensor Suite and the Weighed Average Formula

Post by Sobuno » Wed Jan 29, 2014 9:47 am

Savacc wrote: Another Edit:
The difference between an amazing success and great success is in this bit of code
if(assemblyResult == CraftingManager::AMAZINGSUCCESS)
return 1.05f;
float result = 1.1f - (assemblyResult * .1f);
return result;
/*
else
return 1.0f;*/
}
float CraftingManagerImplementation::getAssemblyPercenta ge(float value) {
float percentage = (value * (0.000015f * value + .015f)) * 0.01f;
I do not speak C++ so I dont really understand what all of that says, but what I do get out of it is that amazing successes get a bonus 1.05f where all others get 1.0f
What that works out to, is that with near perfect resources you get a great success in assembly of 29%. If you get an amazing success instead, you get a 31% assembly.
This is not the way it was in SOE's game. On Live, great and amazing successes were identical (they would have both been 29%) for assembly.

Careful there, everything between /* and */ is comments and the function with the if ends at the }

Code: Select all

{
//Previous code from function up here somewhere...
	if(assemblyResult == CraftingManager::AMAZINGSUCCESS)
		return 1.05f;
	float result = 1.1f - (assemblyResult * .1f);
	return result;
}

float CraftingManagerImplementation::getAssemblyPercentage(float value) {
		float percentage = (value * (0.000015f * value + .015f)) * 0.01f;
//This function continues down here

}

User avatar
Savacc
Architect & Shipwright Forum Moderator
Posts: 1211
Joined: Mon Mar 26, 2007 9:45 pm
Location: Central Oregon

Re: Micro Sensor Suite and the Weighed Average Formula

Post by Savacc » Wed Jan 29, 2014 10:22 pm

OK here is a larger section of the code. I am not sure I can even get to this anymore.
int luckRoll = System::random(100) + cityBonus;
if(luckRoll > (95 - craftbonus))
return AMAZINGSUCCESS;
if(luckRoll < (5 - craftbonus - failMitigate))
luckRoll -= System::random(100);
//if(luckRoll < 5)
// return CRITICALFAILURE;
luckRoll += System::random(player->getSkillMod("luck") + player->getSkillMod("force_luck"));
int assemblyRoll = (toolModifier * (luckRoll + (assemblyPoints * 5)));
if (assemblyRoll > 70)
return GREATSUCCESS;
if (assemblyRoll > 60)
return GOODSUCCESS;
if (assemblyRoll > 50)
return MODERATESUCCESS;
if (assemblyRoll > 40)
return SUCCESS;
if (assemblyRoll > 30)
return MARGINALSUCCESS;
if (assemblyRoll > 20)
return OK;
return BARELYSUCCESSFUL;
}
float CraftingManagerImplementation::calculateAssemblyVa lueModifier(int assemblyResult) {
if(assemblyResult == CraftingManager::AMAZINGSUCCESS)
return 1.05f;
float result = 1.1f - (assemblyResult * .1f);
return result;
/*
else
return 1.0f;*/
}
float CraftingManagerImplementation::getAssemblyPercenta ge(float value) {
float percentage = (value * (0.000015f * value + .015f)) * 0.01f;
return percentage;
}
Sobuno, can you look at this thread and tell me what is going on there? http://www.swgemu.com/forums/showthread ... post901971

Kookoy
Novice Crafter
Posts: 18
Joined: Sun Sep 15, 2013 4:50 pm

Re: Micro Sensor Suite and the Weighed Average Formula

Post by Kookoy » Wed Jan 29, 2014 11:18 pm

Going from the code Savacc originally posted I believe an Amazing Success on initial Assembly yields 1.05 times that of a Great. I've tested this and it seems to be working that way.

I've made some crafting stations with just 1 of each subcomponent. The Control Unit seems to be working okay, however I get mixed results with the Droid Storage Compartment and Energy Distributor. I went back to making Droid Storage Compartments and got some strange findings.

DSC's only use 23 units of metal and rely only on OQ for Effectiveness. In my first test I used 993OQ Aluminum, got a Great Success on initial Assembly and a starting percentage of 29%.
X = (993 * (.000015 * 993 +.015)) * .01 = .29685735 (the UI reads 29%)
For quality rating I was using an "old" (old meaning PreCU) formula of (X*10)-5 which gave me -2.0314265, the UI read -2 so all seemed good at that point.

However,

I then tried another DSC with 23 units of 960OQ Aluminum and got the following with a Great initial Assembly:

X = (960 * (.000015 * 960 +.015)) * .01 = .28224 (the UI reads 28%)

But here's the kicker: The quality rating on the UI read -3. Using the formula above it should have been -2.1776, or -2

Also, I experimented the Effectiveness to the maximum (8 Greats and 2 Amazings, or 28+56+16, or 100) which should have returned the max experimental percentage of 96%, but the UI read 95%.

I did come across a thread at SWGEmu that spoke of floating points but didn't quite understand it. Perhaps that 95% is really a truncated 95.999999%

I didn't bother with the Energy Distributor after that, but there has to be something I'm missing, perhaps using the wrong formula for Quality rating, unless the DSC is bugged.

User avatar
Savacc
Architect & Shipwright Forum Moderator
Posts: 1211
Joined: Mon Mar 26, 2007 9:45 pm
Location: Central Oregon

Re: Micro Sensor Suite and the Weighed Average Formula

Post by Savacc » Thu Jan 30, 2014 9:53 pm

Well, the droid storage compartment is bugged in that it should be 50% CD and 50% OQ. We caught that on TC several months ago. Im thinking it should have been merged to Basilisk with Pub 4, but maybe not, it could be waiting for pub 5 to be merged.

The only other thing I can think of is that the DSC takes 5, are you saying you only put one in, or that you made a crafting station with only the 5 DSC, no other subs?

Sobuno
Developer
Posts: 2589
Joined: Sun Mar 25, 2007 2:17 am
Contact:

Re: Micro Sensor Suite and the Weighed Average Formula

Post by Sobuno » Fri Jan 31, 2014 1:53 pm

Use the [code] tag for code in order to preserve readability instead of [quote]. I'll take a look at the code next week, a bit busy this week.

Kookoy
Novice Crafter
Posts: 18
Joined: Sun Sep 15, 2013 4:50 pm

Re: Micro Sensor Suite and the Weighed Average Formula

Post by Kookoy » Fri Jan 31, 2014 6:29 pm

Savacc wrote:Well, the droid storage compartment is bugged in that it should be 50% CD and 50% OQ. We caught that on TC several months ago. Im thinking it should have been merged to Basilisk with Pub 4, but maybe not, it could be waiting for pub 5 to be merged.

The only other thing I can think of is that the DSC takes 5, are you saying you only put one in, or that you made a crafting station with only the 5 DSC, no other subs?
The Micro Sensor Suite is 33% CD and 66% OQ, as of now the others rely only on OQ.

And yes, I made a station with 5 DSCs and nothing else. Also a station with just the Control Units and just the MSSs, IIIRC only the station with the control units came out to what was expected.

Kookoy
Novice Crafter
Posts: 18
Joined: Sun Sep 15, 2013 4:50 pm

Re: Micro Sensor Suite and the Weighed Average Formula

Post by Kookoy » Sat Feb 01, 2014 10:10 pm

Posted my results on the SWGEmu forums. I had missed a final calculation when making the MSSs, and when I went back through everything I made even more errors!

All seems correct now as per my post on SWGEmu, just a slight discrepancy with some of the initial Assembly stats but the end results are acceptable to me (unless I'm doing it wrong ha!).

Thanks guys for your quick respsonses and input, glad to see SWGCraft is still alive and well.

Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests