SRL Archive - MSI Suggestions

Adding "BadColors" to TMSObject


Coh3n

2011-09-17 02:39:21

This was actually already in the original TMSObject record and I'm a little mad at myself for removing it when I rewrote Objects.simba some time ago. The idea is that if one of the "bad colours" is found in one of the "valid" object boxes, the algorithm will skip that box.

I'm thinking this will be simple, yet effective.

Planning:
  • Two fields added to TMSObject:

  • BadColors: TIntegerArray;
    BadTolerances: TIntegerArray; // length = length(BadColors)
  • Each element in BadColors will correspond with each element in BadTolerances.
  • Use a simple FindColorTolerance in MSI_FindObjectsTPA and search for each bad color in each TPA box.
  • Gather the bad colours for needed objects in MSI_GetObject:
    • Crafting Guild ~ Blue star on wall hanging (for ROCK_SILVER)
    • Crafting Guild ~ Wooden bench colour overlaps with wall hangings (for ROCK_SILVER)
    • Crafting Guild Miner ~ The really dark colours in the wooden benches (for DOOR_NORMAL)
    • The leaves and berry colours on the new trees.
  • Test!
Would love it if someone wanted to take on this task. It's simple, gives you some experience in colour scripting, and I'm willing to walk you through the entire process.

Cheers,
Coh3n

marpis

2011-09-17 04:04:46

I remember using this in the original FindObjTPA, I think.
You just have to remember to be careful with this when dealing with large obstacles, so it's not too sensitive.

Coh3n

2011-09-17 11:13:23

From: marpis
I remember using this in the original FindObjTPA, I think.
You just have to remember to be careful with this when dealing with large obstacles, so it's not too sensitive.
It was. ;)
From: OP

This was actually already in the original TMSObject record and I'm a little mad at myself for removing it when I rewrote Objects.simba some time ago.
And I was thinking of maybe adding a "BadLength" field as well.

NCDS

2011-09-17 11:57:10

From: Coh3n

And I was thinking of maybe adding a "BadLength" field as well.


Definitely. We should be able to identify the bad colors just as well as the good colors so we can ultimately work with both to obtain the best end result.

Coh3n

2011-09-18 18:40:40

From: NCDS
Definitely. We should be able to identify the bad colors just as well as the good colors so we can ultimately work with both to obtain the best end result.
We just have to be careful about the speed. It needs to be done so that the speed of the function isn't affected at all.