• Welcome to SC4 Devotion Forum Archives.

CAM in PIMX - an idea

Started by Infixo, March 05, 2010, 01:01:58 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Infixo

Hello

I'm a great fan of CAM and one day tried to do some cleaning and see what buildings are CAMeLots and which are not. Well, as You are aware many old lots are not. However, PIMX categories are "standard" ones, i.e. R$, CO$$, etc., so basically CAMeLots and non-CAMeLots go into one category and You have to manually check Occupant Groups.

Since the categories are coded in new_properties.xml, it should be be possible to add new ones and expand the tree. So, I did some modifications to the file, and here are results.







Of course, You'd rather not use it for creating descriptors (unless You now which stage it's gonna be), but it is a great help in viewing, validating and updating (i.e. Recompute function to get the proper values for the building)

Here is the sample code I added. Not complicated :) Each sub-category needs such one with proper Occupant Groups codes.

<CATEGORY Name="CO$$ CAMeLot 10" ID="0x6c8fbbf8" ParentID="0x6c8fbbf5">
<HELP>
This selection will filter the display to only show Commercial Office Medium Wealth plug-ins.
</HELP>
<FILTERS>
<NEEDED ID="0xaa1dd396" Value="0xB5C00AC0"/>
<NEEDED ID="0xaa1dd396" Value="0xB5C00AC2"/>
</FILTERS>
<PROPERTIES>
<PROPERTY ID="0xaa1dd396" Set="0x00001001,0x00013320,0xB5C00AC0,0xB5C00AC2,0x00002000,0x00002001,0x00002002,0x00002003"/> <!--OccupantGroups-->
<PROPERTY ID="0x2a499f85" Eval="QueryForCAMCommercial"/> <!--Query Examplar -->
</PROPERTIES>
</CATEGORY>

Anyone interested in the whole file, I'd be happy to post it here if You just tell me how to attach a file to a message... :)
I attach an extract of new_properties.xml with definitions for Residentials and Commercial Office (I did those two categories as for now).

G.

[2010.03.13] Changes
- I added Industry - but only Anchor. Mech & Out are not very popular :) and also not "camelotted" (never seen one).
- Started Comm Services - as for now it splits into CAM and non-CAM.
- Updated the Query - now when You recompute it assigns the CAM Query if it's a camelot. BUT the queries need to be defined in settings.ini
QueryForCAMResidential = 0xca1ca1c4
QueryForCAMCommercial  = 0xca1ca1c3
QueryForCAMIndustrial  = 0xca1ca1c2
This time I attach the whole xml (too much to extract). Changes are marked with comments. There also changes to Landmark section (described in separate post).
G.
Grzegorz, GG #354873

RippleJet

Neat idea, G.! :)


Quote from: Infixo on March 05, 2010, 01:01:58 PM
Of course, You'd rather not use it for creating descriptors (unless You now which stage it's gonna be), but it is a great help in viewing and validating.

Indeed... and by providing invalid data for one property, we can block users from creating these subcategories directly as well.
See how I made the prop categories "Stoplight" and "RR Crossing", and the "Effect" category.


Quote from: Infixo on March 05, 2010, 01:01:58 PM
Anyone interested in the whole file, I'd be happy to post it here if You just tell me how to attach a file to a message... :)

You can do that now! :thumbsup:
Feel free to contact me over MSNM as well!


Quote from: Infixo on March 05, 2010, 01:01:58 PM
I'm a great fan of CAM

Would you be interested in CAM 2.0, its development and beta testing? :)

Infixo


Quoteby providing invalid data for one property, we can block users from creating these subcategories directly as well.
OK, I got the idea. But where are the "CannotCreateXXX" constants defined? Or can it be anything, just invalid? So, the creation can be blocked this way. What about update (i.e. Recompute As... function?) If I put those invalid values, probably this function would stop working as well?

Actually, it would be nice to introduce an attribute for the CATEGORY type, saying if one can create this category or not. This would require changes to the program itself - don't know if wouanagaine is planning any new release? :)

QuoteYou can do that now!
Thx! I did so.

QuoteWould you be interested in CAM 2.0
Sounds very interesting :) I've heard about CAM2, but no specific details about the scope. What's gonna be in there?
I'd like to give it a try BUT I cannot confirm it yet. I've been on a sick leave since January (broken arm), that's why I had some time to play around with tools and stuff. I'm going back to work next week %wrd and I have to find out first what's going on there :)

G.
Grzegorz, GG #354873

RippleJet

#3
Quote from: Infixo on March 06, 2010, 01:36:11 PM
OK, I got the idea. But where are the "CannotCreateXXX" constants defined? Or can it be anything, just invalid?

Exactly, it can be any invalid value, as in this case a string given to a UInt32 variable.
An error message is given in the log window, including this erroneous string.


Quote from: Infixo on March 06, 2010, 01:36:11 PM
What about update (i.e. Recompute As... function?) If I put those invalid values, probably this function would stop working as well?

Yes, and that wouldn't be too good... &mmm
We need to test this with the "Set=" function, which leaves a property untouched during recompute if it's already set (or given).


Quote from: Infixo on March 06, 2010, 01:36:11 PM
Actually, it would be nice to introduce an attribute for the CATEGORY type, saying if one can create this category or not. This would require changes to the program itself - don't know if wouanagaine is planning any new release? :)

I'm sure wouanagaine will return to this, once he's less busy in RL compared to now.... :)
Besides, an update has been in the pipeline for a month or so now. ;)


Quote from: Infixo on March 06, 2010, 01:36:11 PM
I've heard about CAM2, but no specific details about the scope. What's gonna be in there?
I'd like to give it a try BUT I cannot confirm it yet. I've been on a sick leave since January (broken arm), that's why I had some time to play around with tools and stuff. I'm going back to work next week %wrd and I have to find out first what's going on there :)

You've got an open invitiation, so let me know when you want to take part. ;)

Infixo

QuoteWe need to test this with the "Set=" function, which leaves a property untouched during recompute if it's already set (or given).

I haven't found anywhere any specs about the format  &mmm
To quickly summarize, for the PROPERTY:
Set - sets the property if not set, leaves untouched if exists
Eval - calculates and sets (always?)
Value - simply assigns a value (always?)
Remove - deletes a property
Are there any other options?

And You didn't tell anything about what's gonna be in CAM2  :P
Grzegorz, GG #354873

RippleJet

Quote from: Infixo on March 06, 2010, 05:43:30 PM
I haven't found anywhere any specs about the format  &mmm
To quickly summarize, for the PROPERTY:
Set - sets the property if not set, leaves untouched if exists
Eval - calculates and sets (always?)
Value - simply assigns a value (always?)
Remove - deletes a property
Are there any other options?

Those specs are exclusively in wouanagaine's head... ::)
You got them all right, though, and I don't think there were any other options. ;)


Quote from: Infixo on March 06, 2010, 05:43:30 PM
And You didn't tell anything about what's gonna be in CAM2  :P

Secrets, secrets... :D

CAM 2.0 consists of one common part, which is merged with SimCity_1.dat.
That part will also contain a number of bug fixes, and all ingame buildings recomputed with PIM-X.

Plus a few optional addons, making it one of the following versions:


  • Rural CAM
  • Midrise CAM
  • Standard CAM
  • Skyscraper CAM

A couple more to these have also been discussed...

Infixo

Changes
- I added Industry - but only Anchor. Mech & Out are not very popular Smiley and also not "camelotted" (never seen one).
- Started Comm Services - as for now it splits into CAM and non-CAM.
- Updated the Query - now when You recompute it assigns the CAM Query if it's a camelot. BUT the queries need to be defined in settings.ini
QueryForCAMResidential = 0xca1ca1c4
QueryForCAMCommercial  = 0xca1ca1c3
QueryForCAMIndustrial  = 0xca1ca1c2
This time I attach the whole xml (too much to extract). Changes are marked with comments. There also changes to Landmark section (described in separate post).
G.
-----
See the main post for the attachment.
Grzegorz, GG #354873