• Welcome to SC4 Devotion Forum Archives.

Query.txt

Started by sumwonyuno, September 13, 2009, 11:09:04 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

RippleJet

Quote from: niloluiz on November 03, 2009, 06:19:21 AM
That would be interesting and I would be glad to partcipate in any way I can  :)

I've sent you a PM :)

SC4BOY

#41
I puzzled over where to post this question, and this seems the best place. Is there a method to determine for each property type what the "equation" is for desirability?

The issue that caused this to come up was a person who had indicated he was having problems with his C growth being stymied and wanting to know how to get back growing. I advised him on some options, but he reported back that he made it go by putting hospitals and schools covering his C zones. I was a bit taken back by his statement. I was under the impression that those had zero effect on commer and industry.

How can I evaluate that without just making a test city? Are those "equations" known? I see the query text uses the "function" symbols as      f(x) or F(x.y) or f(x,y) etc. Is there mathmatical differentiation among those symbols? I assume there is. My guess was that "f()" is the mapping of the LOT DESIRE FACTORS (ie Co$, R$$ etc) to the TRACT DESIRE FACTORS, but I don't know.

edit: Hmm .. I found THIS POST by RJ to show this for Industry. I assume your "source" is also known for each RCI lot type?

RippleJet

Quote from: SC4BOY on December 22, 2009, 04:45:43 AM
edit: Hmm .. I found THIS POST by RJ to show this for Industry. I assume your "source" is also known for each RCI lot type?

Yes, the same information is available for all types of RCI in their corresponding developer exemplars in SimCity_1.dat,
through the following properties that map the factor into desirability:


  • Land Value Effect
  • Slope Effect
  • Park Effect
  • Landmark Effect
  • R$ Proximity Effect
  • R$$ Proximity Effect
  • R$$$ Proximity Effect
  • Co$$ Proximity Effect
  • Co$$$ Proximity Effect
  • Traffic Effect
  • Trip Length Effect
  • School Effect
  • Hospital Effect
  • Crime Effect
  • Pollution Effect Air
  • Pollution Effect Water
  • Pollution Effect Garbage
  • Pollution Effect Radiation
  • Transient Aura Effect



Quote from: SC4BOY on December 22, 2009, 04:45:43 AM
The issue that caused this to come up was a person who had indicated he was having problems with his C growth being stymied and wanting to know how to get back growing. I advised him on some options, but he reported back that he made it go by putting hospitals and schools covering his C zones. I was a bit taken back by his statement. I was under the impression that those had zero effect on commer and industry.

Plopping a civic building provides transient aura effect in the area.



SC4BOY

hmm, and I assume that even though the factors are constant for every type, that the effects of those factors will vary as you look at each RCI type. Do all RCI types map to the same 0-255 value? or do they all map the same, but the levels just change for each lot type? By that I mean that if a given tract will have an absolute number for desirability, but the decision will be compared to different criteria when the game decides to see which type lot actions to take. Or does the desirability for each type actually change as you look at each RCI type?

cogeo

Hi all,

I have a question: How do you open Query.txt?

If opened in Notepad it doesn't look right, text lines are joined, obviously due to Query.txt using LFs to end lines, instead of CR-LF required by Windows. The only way to display the file correctly (using a commonly available program) is open IE and drag-and-drop it on its client area. However this is extremely inconvenient, as you have to open Windows Explorer, move to the Pragrams\Simcity folder, open IE (which alone may take a lot of time, if the system is loaded, eg if Simcity is running) and perform the drag-and-drop operation. Any alternative please?

jondor

I use something competent and capable of handing different styles of line endings.

Either Textpad or Notepad++ are excellent choices.
All new animated railroad crossing props for networks of all sizes! (Phase 1 complete)--> http://sc4devotion.com/forums/index.php?topic=13209

Mostly writing pony stories on FimFiction.net, but Cities: Skylines is my new best friend.  Anything and everything I made for SimCity 4 is fair game for use and distribution.

cogeo

Thanks for the reply.
Those programs are fine, however they are full-blown editors. I wanted some more basic, with a minimal memory req. footprint (so that it loads immediately), so I'm rather going to make something of my own.

Lowkee33

Faster than notepad++?  Perhaps command prompt  > type query.txt

Swordmaster

I have no idea what Query.txt is, but I use ConTEXT for text editing.

Cheers
Willy

catty

I use wordpad which comes standard on any Windows computer and you can have your computer default to opening a txt file using wordpad

in wordpad it looks like this

Quote
|-----------------------------------------------------------
| Query info for cell (41, 63) on 8/11/2282
|-----------------------------------------------------------
| Lot: (41, 63) 1x1, north-facing, state: occupied new, configuration: Utils_RT_FL_Road_BusSub_0c9dd026
| Jobs $8.0 $$0.0 $$$0.0 - Travel Jobs $8 $$0 $$$0
| Building: Ut_RT_FL_Road_BusSub
| Occupancy--building (tract):
| Zoned: Plopped Bldg
| Altitude: 270.0
| Land value, intrinsic: 12, total: 255 (High)
| Slope: 0.0
| Powered: yes
| Watered: yes
| Network: Road N S
| Network: Subway W
| Network: Pipe N S
| Traffic Volume: 255   Traffic Congestion: 1
| Edge Density Matrix for travel type 0 (total = 941):
|   0   0   0   0       0   0   0   0
|   0   0   0 941       0   0   0   0
|   0   0   0   0       0   0   0   0
|   0   0   0   0       0 941   0   0
| Edge Density Matrix for travel type 1 (total = 0):
| Edge Density Matrix for travel type 2 (total = 0):
| Edge Density Matrix for travel type 3 (total = 0):
| Edge Density Matrix for travel type 4 (total = 0):
| Edge Density Matrix for travel type 5 (total = 0):
| Edge Density Matrix for travel type 6 (total = 410):
|   0   0   0  39       0   0   0   0
|   0   0 129 230       0   0   0   0
|   0   0   0   0       0 129   0  12
|   0   0  12   0      39 230   0   0
| Edge Density Matrix for travel type 7 (total = 0):
| Edge Density Matrix for travel type 8 (total = 794):
|   0   0   0   0       0   0   0   0
|   0   0   0 794       0   0   0   0
|   0   0   0   0       0   0   0   0
|   0   0   0   0       0 794   0   0
| Edge Density Matrix for travel type 9 (total = 0):
|-----------------------------------------------------------
I meant," said Ipslore bitterly, "what is there in this world that truly makes living worthwhile?" DEATH thought about it. "CATS," he said eventually, "CATS ARE NICE.

toja

Quote from: cogeo on November 22, 2012, 07:35:06 AM
I wanted some more basic, with a minimal memory req. footprint (so that it loads immediately).

Notepad2 works fine for me.

cogeo

#51
Thank you all for your replies and links!  :thumbsup:

@Swordmaster: You're in the right thread!  ;)

As mentioned above, I'm writing a small and lean view-only utility, with minimal resource requirements.
It should be ready by tomorrow.

cogeo

#52
Hi again,

As said above, I finally made a small utility to display the Query.txt contents properly. It's a very lean program with minimal resource requirements, loading almost immediately, even when Simcity is running. It's stripped of any feature other than displaying a LF-terminated textfile. It's written in simple C and WinAPI, and has no dependencies like the MFC runtime, .NET or Java. You can download it from the attachment at the end of this post - it's too small in size (just 32KB) so it can be placed in an attachment.   ;)

Here is a screenshot:



Installation: Sorry, no installer, so you have to install it yourself. Take the following steps:
- Unzip the attachment and copy the file somewhere under your Programs folder, eg under C:\Program Files\Maxis\SimCity 4\Apps.
- The program has no menus (File->Open command), neither it supports drag-and-drop, instead it opens the file specified in the command-line. Therefore you have to create a shortcut, as described in the next steps.
- Right-click on the executable, select "Copy", and then go to your Desktop, right-click and select "Paste Shortcut".
- Rigth-click on the shortcut, select "Properties", go to the "Target" box and add Query.txt (full path) after the executable name, eg "C:\Program Files\Maxis\SimCity 4\Apps\QueryVw.exe" C:\Program Files\Maxis\SimCity 4\Query.txt
- Alternatively, you can omit the full path, eg "C:\Program Files\Maxis\SimCity 4\Apps\QueryVw.exe" Query.txt, but in this case you must put the path in the "Start in" box, eg "C:\Program Files\Maxis\SimCity 4"
- You can copy or move the shortcut to any other place, eg under the Programs Menu, if you want.

Uninstallation: The program doesn't write anything in the Registry or your Application Data folder, so if you want to uninstall it, all you need to do is delete the executable and the shortcut(s) you have created.

Enjoy!

BloodCat

Hi everyone!
There was a bug mentioned in this thread, the one making Medical Clinic demand less workers than it should. Is there a fix to make this right?

catty


Quote from: BloodCat on March 25, 2013, 10:40:08 AM
Hi everyone!
There was a bug mentioned in this thread, the one making Medical Clinic demand less workers than it should. Is there a fix to make this right?

Not as far as I'm aware and it affects more than the Medical Clinic, see this last post from RippleJet on the subject.

Quote from: RippleJet on November 02, 2009, 03:36:32 PM
Double-posting as this is not directly related to my previous post (I hope Steve comes and reads this...)

Quote from: HeinBloed4711 on November 02, 2009, 06:42:25 AM
BATers (and LOTers) should be aware of this bug and ideally test their ploppable buildings against it.

I needed to recheck the formulas for civic jobs as set by the "X Tool",
and luckily I have never given the same formulas for jobs$ as for jobs$$ and jobs$$$.

E.g. medical clinics and hospitals are given jobs by these (XML) formulas:

<eval name="CivicJobs" value="int(ceil(Patients/30.))"/>
<eval name="Jobs1" value="5+int(CivicJobs*1./5.)"/>
<eval name="Jobs2" value="2+int(CivicJobs*3./5.)"/>
<eval name="Jobs3" value="0+int(CivicJobs*1./5.)"/>

The rare case when Jobs1 = Jobs2 = 6 ( when CivicJobs are 7 or 8 ) can probably be looked over,
as that would correspond to a patient capacity of only 181...240.

Ingame civic buildings should be recalculated with the "X Tool" for CAM 2.0 though... ::)

-catty
I meant," said Ipslore bitterly, "what is there in this world that truly makes living worthwhile?" DEATH thought about it. "CATS," he said eventually, "CATS ARE NICE.