Jump to content

OrSpeeder

Member
  • Content Count

    56
  • Joined

  • Last Visited

Everything posted by OrSpeeder

  1. Do you want a save editor?

    From what I've seen so far, the save files serialize things based on the IFF format specification from 1985, with some modifications. Basically all files seem to follow this structure: File size, CRC stuff, more CRC stuff, data. The data part usually having a format that mixes C structs fields, with arrays, arrays have immediately before them the number of elements, arrays can contain objects with variable lengh, when this happen the object lists its own length on a header. I made a script for 010 Editor that understand the history warehouse subfile (I made it aiming to export the data and make pretty graphs... pretty much useless, since most of the graphs are in-game too anyway). Here is the code. struct FILE { struct HEADER { int fileLength; int unknown1; int unknown2; short version; int amountOfSets; } header; struct HISTORY_DATA { DATASOURCE_ID datasourceId <format=hex>; unsigned int graphType <format=hex>; unsigned int dataPairAmount; struct DATA_PAIR { unsigned int timestamp; unsigned int data; } dataPairs[dataPairAmount]; } historyData[header.amountOfSets] <optimize=false, open=true>; } file <open=true>; If you are wondering, <open=true> just tells the 010 editor to automatically open the tree (so I don't have to manually open every time I run the script), and <optimize=false> warns 010 editor that the array contains variable-length elements (it by default assume all members are equal, this make it run faster, but it breaks badly on SimCity 4 save files).
  2. High Speed Rail

    The ferry does have its own network. I have no idea how it works, but when the Transit Simulator is calculating stuff, the Ferry is calculated completely separately, also the Ferry has its own separate network, and own separate handling class. I have the impression the ferry was coded later, differently, and was "tacked on" over the existing stuff.
  3. What brand is far from mainstream? nVidia is wildly popular! And many major manufacturers are cranking Optimus laptops like there is no tomorrow!
  4. Do you want a save editor?

    The CRC is seemly only a CRC, in the sense it is used only to check for file integrity, not any serious protection. Also, all files have the CRC in the header, but the save file is just a normal DBPF file otherwise, I think if you only need to recalculate the CRC for the file you edited, not all of them, and the algorithm is probably the same for all of them anyway. If you people wanna see what each file in the save file do right now, just open the file in Reader, copy the "type" part of the Resource Key (TGI), and look for it in the list I pasted on SC4Devotion Example: in the wiki, it is stated that the meaning of the type id 6990c1aa is that it is a "Sims to Jobs Match" but if you look for it on my list, you will see this is the class if for the class cSC4TrafficSimulator The class is serializable, meaning that when saving the game, the engine converts the whole class into data, and paste into your save file. (also, it DOES have "sims to jobs" information in it, but this class controls the whole traffic system, not just that, it is where is stored the commute times, traffic volume, paths, etc...)
  5. Well, I was poking around here and there, and found out the game has a lot editor. Also it has a Lua debugger. Also it has a network lot editor. The thing is, I can't figure how to fire them up, I concluded that you need a dll similar to cheats dll... anyone here that made DLLs before is willing to help with that?
  6. Heh. By the way, I found this on the archive.org version of SimCity.com site from the end of 2002 (right next to the release of the game) I found out what is Edith, Ingred and Freshness. Freshness, is related to audio, I am not sure how, but the game has a couple classes called "freshness" that are related to audio. Ingred, that many people probably heard about with "Ingred.ini" is Maxis version of the Reader, according to Paul Pedriana (I e-mailed him) he thinks (he is not sure) it means "In Game Resource Editor", among its features is check if the values you entered on the editor are valid (Reader will happily let you do invalid stuff). I have no idea what Rosie, Bob, Uber-Bob and Porcupine Racetrack do. Now Edith is interesting: Edith is the editor for Sims behaviour, it was invented for The Sims 1, and re-used while making The Sims online, and seemly all Sims game since, it maybe was used on SimCity 4 to make the "MySims" feature, but I am not sure, but the interesting thing about it, is that it leaked when EA shut down The Sims Online servers, they made a "final release" of the client, having more stuff in it (including many dlls that weren't by default present), probably this was the work of Maxis employees doing it "behind the back" of EA, knowing full well the community would reverse engineer and clone TSO, indeed the community did just that, but EA never took the download down. Out of curiosity, I downloaded EA TSO, and took a look on its files, Edith is indeed there, it is a dll that works exactly like the Cheats.dll, thus proving my earlier theory true (that you need a dll to launch some editors). But my time is limited, and I won't plan in trying to launch Edith with SC4 any time soon, since I am uninterested in MySims feature.
  7. Just caution with this advice: On Optimus Laptops, Linux don't work (with some exceptions). Or rather, the GPU don't work, the Optimus drivers unfortunately are still very proprietary, and the drivers that try to reimplement it on Linux don't work properly so far.
  8. I dunno about OP, but in my mod was to make the game more realistic and fun. The problem with the vanilla crime rate is that highly educated, or rich citizens, commit much less crimes, if you manage to have a city with lots of both (Example, most of the jobs come from high tech industry and commercial offices), you might end with a city that has zero crime even without police... It should be possible to zero crime, like Quebec city (that had zero murders for several years in a row), but police should be still necessary, and the occasional crime should still happen.
  9. I plan on increasing this on my mod later, but this already exists in-game, is just hard to notice, but Crime is one of the major motivations about Mayor opinion, if you somehow make crime get rampant (on vanilla is too easy to erradicate crime, even without police stations), you will end with people moving away and riots.
  10. Any moderate version of this mod?

    Well... I think doing that make the game too easy. But if you ahve NAM, it has a tool that let you change global noise effect. Mind you, this will make people more away from your city, and dilapidade more, instead of less. Traffic noise ATTRACTS commercial by the same amount it repels residential, the idea is to make you figure how to make decent planning, like it happens in real world cities. But you can with NAM make traffic noise irrelevant, but then you will need to make people join your city purely with industrial jobs.
  11. Ressurecting this thread again. I found out the game has much more cheats than we know, and maybe it has a internal lot editor, and maybe a exemplar editor too, also it has a script editor for networks, with a debugger, you can find the interface for the network script debugger with the Reader, the GZPersistResourceKey (also known as TGI) is 0x00000000,0x96a006b0,0xcba9ef16 The cheat box is actually a "SystemSupport" command box, and can do many things. I decided to start with something simple, since we already knew that "Demolish" (with a D, yes, not d), already worked, I went to check how much arguments it take... and found out it takes 5 arguments. The first 4 are numbers, the fifth I don't know, but it controls if the animation for demolition is a normal one, or a explosion. So after some trial and error, I found out that the Demolish command number arguments are the coordinates for a rectangle, for example "demolish 0 0 10 10" demolished everything from the top left of the map (0, 0) to 10, 10 on the map. Some other commands worthy researching: The entire list of commands for the "Tool Command Support" PlaceNetwork < first argument seemly is the network name (example: "Rail" or "Road" or "Avenue") I don't found anything else about it unfortunately, but it does work. PlaceNetworkIntersection < ??? PlaceLot < similar to the LotPlop command, but opens the plopping window with more arguments, and it checks information in the class that is seemly a in-game lot editor... Also this command don't close the cheat box when it fails, making you think it is a invalid command, but it is not, it actually works, but I don't found out the correct arguments yet. PlaceZone < ??? Demolish < I mentioned before. GetViewTarget < I don't even checked what is this SetViewTarget < I also don't checked. Entire list of commands for "Misc Command Support" ListCommands < dummied out SetDebugLevel < sets debug level, it does work even when it refuses to close the dialog box, but I don't found out yet what debug levels actually exist, and what they do. CreateGZLog << take as argumenta filename, it creates a file to be used later. GZLog < dummied out SetGZLogLevel < works, and do something, but I dunno what. Assert < I don't tried RZCheckHeap < I don't tried ExecuteScript < seemly this can run a arbitrary Lua Script, but I am unsure yet how to test this, since I don't found out yet howto make Lua do something. GetDateAndTime < gets date and time... and puts somewhere I don't found out yet. GetTimerDate < same as above... GetFrameCount < ditto GetFrameRate < ditto ExecuteCheat < confusing command, I have no idea what it do WaitForMessage2 < I don't checked CancelWaitForMessage2 < ditto GetPathDirectory < get SC4 path and store "somewhere" GetPathFileName < ditto GetDirectory < ditto GetRandomNumber < calculates a random floating number, stores "somewhere" GetRandomInteger < ditto, but for integers TakeSnapshot < don't tried GameDelay < don't tried GamePause < don't tried ReadRegistry < don't tried, and I would not mess with that, seemly it is related to Windows Registry WriteRegistry < ditto ViewWebBrowser < opens a web browser, but I can't get it to work, but that is not a surprise, since clicking on the button to open Sim City 4 site on the main menu don't work either. SendMessage < sends a message in the internal messaging system between classes, don't mess with this. GetAppState < ??? SetScriptAutoYield < ????? CreateException < creates a C++ exception, also known as: crash your game. GetPopupModalDialogsSafe < ??? GetPopupModalDialogsEnabled << gets if popup modal dialogs are enabled, store it "somewhere" SetPopupModalDialogsEnabled << sets the option to enable modal dialogs... I have no idea what this do. GetOccupantCount < ??? GetMemInfo < gets lots of information and... I have no idea what it do with it. There is also the GZWin commands mentioned earlier in the thread, they are all valid cheats, it is just a matter of us not knowing how to use them yet... for example I $%&^!ed up my PC with the cursor command of interest in the GZWin commands is the GZWinCreateWindow command, it creates a window based on the "UI" file, probably it is to allow you to test if the UI you created is correct, unfortunately I don't found out how to make it work, if you type the arguments wrong, it does not even close the cheat box, making you think it doesn't work, it does work, but I don't found out how to point the arguments properly yet (I know it takes at least 3 arguments, that one of them is the Instance part of the UI File Persist Resource Key, and other argument is the "ID" of the GZWinGen tag (example, the quit dialog has instance number 0x6a553aa4 and ID is 0xaa921f4f according to the reader). But I don't found out yet how to properly input this (hexadecimal? decimal? 0x on the text? uppercase? lowercase? etc.. etc...)
  12. Lousy Network Textures

    I dunno if it has anthing to do with it... but I noticed it recognized that you don't have DXT, this refers to the texture decompression hardware, invented by S3 graphics, and related to the S3 graphics format you see on the game files, maybe it is trying to use alternative non-compressed textures and achieving this bad result.
  13. Alan Doherty... Thanks! (I've been scrouging stuff all over the net!) Some more stuff Paul "leaked": Paul is the creator of EASTL, that was used just after SC4 was finished (if you are wondering, SC4 itself use STLPORT, you can see the game has a segment named "SETLPORT_", that is short (segments can't be named more than 8 characters) for "STLPORT_NO_INIT" that is a ugly hack to force MSVC to use STLPORT iostream functions (MSVC iostream functions crash STLPORT... I suspect EASTL also crash MSVC if it let default iostream). So, EA used Webkit, that is GPL, and was forced to release their Webkit GPL, this include some supporting libraries to compile EA Webkit, this include a file named "refcount.h" that is actually a hacked file from "EACOM/refcount" according to the comments, but can be easily regognized as part of the rizzo/gonzo framework. On that .h there is a source, and explanation, for a function that appears on Buggi's partial source for the cheats dll, it explains (and provides source) for the function AsPPVoidParam. Now a link to that: https://github.com/xebecnan/EAWebkit/blob/master/EAWebKitSupportPackages/EATextEAWebKit/local/include/EAText/internal/EATextRefCount.h Also the source there explains lots of design decisions that I am sure applies to the rest of SC4 (like the memory manager system).
  14. SC4Fix: third-party patches for SC4

    Random information on the multicore issue: SC4 create threads, mutexes and whatnot (you can see using any task manager app, "Process Explorer" being my favourite). But seemly it only uses them to allocate and deallocate memory, meaning it has multi-threaded safe loading of files, but nothing else, thus why it is "mostly" stable with multicore. On my machine at least it crashes a lot with multicore enabled I guess because SC4 can't handle the infamous gettick bug, and my laptop is prone to cause that bug. Info on the gettick bug: You can ask the processor, for the current time with nanosecond precision... for this to work, the processor itself must count time, instead of using the system clock, this of course is unreliable (ie: over time it become more and more offset from the real time). This is not a problem for a single-core app, it will always get the same number, but when it is a multi-core app, each core will reply with their own clock, that might not necessarily match (for example: my laptop when overheating slows down one of the cores first, running it at 3Ghz while the others at 3.2Ghz, the core is probably not aware of this immediately, and might count 200Ghz slower). Some apps handle this badly... I for example found out about this bug when making a game that used physics, the physics engine needed the precision clock to calculate with precision how much to update the physics (the engine instead of updating per frame, updated per time, using classical physics formulas, for example that position = initial position + velocity * time), my game outright crashed when it happened. There is details about this happening on file writes too, a guy was debugging his server that kept crashing in a particular IBM mainframe running windows, and found out about this bug, because as each processor worked on writing down files, each file had a different timestamp, sometimes the timestamp was up to 4 miliseconds in the future, and this crashed the server.
  15. I started making a mod a long time ago... I decided to continue it. Except I can't remember what I changed, although I have the list of examplars I changed, I have no idea WHAT I changed inside them. How I check that?
  16. I noticed there is ilives reader, and sc4reader But even more confunsingly, when I went to check my ilives version, by opening using a shortcut, it opens a installer (that i was confused, and cancelled), and when I go to its folder, it opens normally... Since I could not find what version it was, I found the changelog on its folder, the changelog says the most recent version is v1.5.2b of December 2015, but the files were last modified this march... thus making me even more confused. I tried looking for it on google even, ended only finding version 0.8 on STEX, and no newer version. So, what reader I should use, and where I get it?
  17. I am making a mod NOT related to transit... But it DOES mod the bonus (or penalty) for desirability that is affected by commute time. SC4 calculate the bonus by converting the actual commute time to a number from 0 to 255, then on vanilla it gives a -10 penalty for long commute, and 10 bonus for short commute, this shows in the interface when you query a residential tile (even one not developed yet!) it shows "Commute Time" and displays "Short, Medium, Long" as appropriate. But I cannot figure how on earth it calculates that... I even made a city without neighbours to see what would happen, but had no success, in the neighbourless city, I managed to bring the citywide average commute time to 2 hours, and set NAM maximum to 10 hours (it is NAM default by the way, but I also played with other values), yet all residences show "long" commute...
  18. I am making a "hardmode" mod... Or rather, I was, I started making it months ago, stopped, and I am considering finishing it... Features so far: Features regarding fires Fires are actually dangerous, they will burn buildings down if you take too long to put them out, also they can spread decently, a fire in a "shantytown" neighbourhood will quickly burn the entire neighbourhood down if neglected. Good street planning is actually needed (because the way the game simulate fire trucks, if you make crap streets, fires will burn entire blocks before your trucks ever get there) Fixed Maxis Fire Station "cheat", that made fires never happen inside fire station coverage (unmodded game make about 25% of maximum protection already wipe out all fires instantly) Features regarding crime Fixed Maxis Police Station "cheat" that made crimes always happen inside police station coverage (unmodded game made that even if you have 10 police stations around a square, it would only stop 50% of crimes, I bumped it to 97%) High education crime chance instead of 0, is 0.0001 (thus you will see some rare crimes if you manage to have a maximum educated city) Wealthy citizens with maximum education commit crimes (0.003 to be exact), reflecting those greedy "onepercenters" we all know. Joblessness has greater effect on crime (to both increase and diminish it) Features regarding budget Less starting money, with "0" money on hard, akin go Sim City 2000 You have 30 years to pay loans (instead of 10) Total interest is higher, but it is smaller per year (this is to encourage more strategical loans, and allow SC2000 hard mode game with starting loans only) Utilities, schools, hospitals, police and fire stations accept lower funding before striking, and need less funding to stop striking, making reducing budgets a possible strategy Made 100% funding for utilities stop repairing them, now to repair stuff you need more than 100% of funding (but at exact 100% they don't break either). Increased pipe burst probability... I have no idea what this do! (I never saw a pipe burst, can someone give me some light?) Features regarding happiness Having, or not having, schools, parks and hospitals has greater effect Crime has MUCH greater effect (now that crime is "fixed", if you let crime run rampant it is your failure, not the game engine, and citizens will hate you for it) Happiness value updates faster Wealthier citizens and business are "grumpy" and need more work to be happy with you. Poor citizens in high wealthy areas are happier than in vanilla Rich citizens in poor areas get angrier than in vanilla NAM related fixes Power stuff has wider radius (thus you can more easily handle power lines when you have NAM extremely wide highways in use) No positive effects for 0 commute time (NAM makes all commute time be 0, unless it is to other city, then it is 255...) Some future ideas are Fix pollution system (it is extremely wonky actually, and has variables spread out all over the place :/) Fix the mansion bug (when mansions kick out all high density low and medium wealth buildings and your population drop) Improve land value calculations (so that "medium" values are more common than extremes) Attempt to fix nam "0 commute" problem somehow... Anyone else has any more ideas on what to fix, improve or add in game mechanics? Or comments on what I am doing now?
  19. SC4Reader Tool

    SC4Reader don't launch at all for me, then it opens a dialog box and writes: "The instruction at 0x00932c72 referenced memory at 0x00000028. The memory could not be read."
  20. SC4Fix: third-party patches for SC4

    I came to check the forums, and stumble on this... WHOA!!! Maybe I will even get back making my mod (I had sort of given up because I had some issues with it that were unsolvable without this kind of modding)
  21. Some months ago I was making such mod (not only for crime rate, it affected lots of things). I don't remember specifics now (I just came to check to see if anyone made new interesting mods), but the unmodded game handling of police stations and crime is actually very $%&^!ty, but I don't remember now what I changed. (I don't even the name of that program you use to make mods, that let you edit lots of fields) EDIT: link to the thread where I was working on my mod https://community.simtropolis.com/forums/topic/66436-any-sc4-mod-to-make-gameplay-more-interesting/#comment-1561103
  22. I am playing SC4 using NAM, SPAM and Industrial Revolution as base mods... But I noticed most mods are just new graphics, or sometimes some functional mod here or there to make the game easier or more reasonable. There are any mod that make the game more interesting instead? After a while, you figure how to plan the transit, the zones and the civic buildings, the game become quite easy, just a matter of following RCI while keeping positive cash flow, it is not hard to soon amass several millions of simoleons without cheating, at this point it cease being a city simulator and become just your personal diorama. So, any mod that fix that? Or improve the gameplay?
  23. So, my city is full of healthy sims: Note, I am NOT using park and ride. Also sometimes I see sims commuting to one city like that, crossing the entire city, and commuting to another, and ignoring bus stops, it is not the case on this map, because it has no neighbours, but it is still weird. Also I have two questions: 1) Pedestrians generate traffic noise/costumers ? 2) Pedestrians generate congestion?
  24. Oh, I am thinking of making residential attract appropriate level-offices and shops later. Trying to fix some other stuff first. Anyway, I made another long playthrough last night, it has been fun, and successful, without being too easy or too hard. I noticed three interesting things: First, mansions... well, as soon as they can they will move in, I figured the best I could do is just assume that whatever place they will settle will end being the city wealthy area, at least until you really need space and bulldoze them down (then probably high-density buildings will take over the spot first). Second, land value can EASILY reach 255 (the maximum), unless your pollution is completely broken, providing schooling and health facilities will bump it to 255 (the maximum), specially on the start of the game, when you don't have much traffic and pollution. This is why mansions can move in large groups, they are just outpricing everyone else, because they can pay the maximum land value. Like I said, maybe I will try to tweak pollution later. Third, if you insist in using only low density zones and just sprawl all over the map, even with my harder mod you can build some huge positive cashflow, when things slowdown and you need higher densities (specially BECAUSE of the mansions) then things become hard again, as you will have to suddenly have lots of utilities you don't had before (like water and garbage collection). Fourth, on low densities you can spend 30 years without garbage collection, SIMs won't notice... I only put garbage collection when I decided to have higher densities, and the garbage was looking ugly near megalots (unviersity, army base, etc...), but even with the graph showing 120.000 of total garbage, the data-view showed only some yellow spots, and the megalots red... I think I will need to lower thresholds for sims to get bothered by garbage (instead of raising residential garbage generation, if I take that second option you will go bankrupt easily once you start placing landfills, because of how crazy expensive they are to maintain). Fifth, my city has 120k citizens, and no police... :/ It is just... not needed, there is not enough crime, the few houses that have been attacked usually just drop in value from 255 to some medium-ish value that is still high, meaning it has no practical effect on you. At the same time, having no police made high-density gameplay a little easier to budget... still, the game is nowhere near SC1 and SC2 levels of need of budgeting, maybe I there are space to make it a tad harder to fix this issue.
  25. job population

    In Sim City 4 water works by having a "water level", everything above it is land, everything below is water. So to create a lake just make a hole deep enough for one.
×