SC4 Devotion Forum Archives

SC4Evermore International => Japan, so far, so near -- 遠いようで近い国、日本 => Topic started by: Kitarn on November 17, 2017, 07:18:25 AM

Title: Problem with the Neko Brook ditches
Post by: Kitarn on November 17, 2017, 07:18:25 AM
In a great 'down the rabbithole' session of downloading Japanese plugins I found the Neko Brook ditches. They look fantastic, but for some reason the game keeps a yellow arrow across the pieces (see attachment). I checked, but couldn't find anyone mentioning this previously. Am I doing something wrong? Any help would be greatly appreciated.
Title: Re: Problem with the Neko Brook ditches
Post by: mgb204 on November 17, 2017, 03:19:07 PM
Briefly looking at the files, I can see a bunch of models that explain this behaviour. It can be quite common practise to add helper pieces (in this case yellow arrows) as props to a lot, to help you to line them all up correctly when placing them. Such props should have timing set so that after a brief period they are switched to invisible models. So a few things to make sure of before we assume there is an error here.

Firstly, having placed them did you run the simulator for a bit? Secondly, what happens if you zoom in/out or rotate the view in-game, does this change things at all?
Title: Re: Problem with the Neko Brook ditches
Post by: Kitarn on November 18, 2017, 05:52:14 AM
I've let the game run for quite a while and the arrows did not disappear. I have noticed that at certain zoom levels the arrows are less visible. Rotating the view did not change anything. I have also tried restarting the game, but this also had no effect.

Google Translate was able to translate some of this page (https://translate.google.com/translate?sl=ja&tl=en&js=y&prev=_t&hl=en&ie=UTF-8&u=http%3A%2F%2Fhide-inoki.com%2Fbbs%2Fphpbb2%2Fviewtopic.php%3Ft%3D858%26sid%3D453f936e7fc3c3de16399cee74090af4&edit-text=), but some stuff remains gibberish to me. I hope that can be of help.

Edit: I've tested some more and it appears this arrow glitch only happens with the straight pieces. The diagonal pieces are fine.
Title: Re: Problem with the Neko Brook ditches
Post by: mgb204 on November 18, 2017, 12:08:07 PM
It looks like the problem here is because the land isn't flat, the timed pieces that appear are supposed to sit atop the arrows. But this can be thwarted by even a gentle slope change between pieces/tiles, allowing parts of the yellow arrows to appear through the props on the surface.

In-short this is pretty much working as designed. There is a potential workaround, I converted all the props in Neko_Arrow_Base_Desc.dat into timed (RKT4) props, which go invisible like I mentioned previously. I had wrongly assumed these were setup that way to begin with, but it's clear poking around the files that's not the case. Also, it's quite immediately apparent why this isn't an ideal thing to do for such a set. When you try to plop these lots using such a setup, you have no guide for how/where to place the pieces. Since the already placed ones are simply not there until the next season change occurs. As such, with the arrows swiftly removed, building the brooks without the arrows becomes really quite tricky. Sadly you really cannot switch between the regular and timed props to work-around this either, since that could lead to prop pox.

So either build them on completely flat land, which is better since these are models and not textures, they can not completely conform to terrain changes. It would be possible to create a set of blank/invisible models, which override the arrows and move said file in and out of the plugins folder as desired. So if you really must have these work without flat terrain, that would be the solution.
Title: Re: Problem with the Neko Brook ditches
Post by: Kitarn on November 19, 2017, 05:20:03 AM
Are you completely sure about that? I've placed four 1x1 ditches next to each other on a completely empty map and I still managed to get an arrow partly visible. Could it be that my terrainmod is at fault here? (Italia by C.P.)

QuoteIt would be possible to create a set of blank/invisible models, which override the arrows and move said file in and out of the plugins folder as desired.
As someone without any experience creating files, how would I do that?

Thanks for everything so far by the way :)
Title: Re: Problem with the Neko Brook ditches
Post by: art128 on November 19, 2017, 05:33:02 AM
Which OS are you playing on? It looks like you're using Mac OS.
Title: Re: Problem with the Neko Brook ditches
Post by: Kitarn on November 19, 2017, 07:39:02 AM
I'm on Windows 10.
Title: Re: Problem with the Neko Brook ditches
Post by: mgb204 on November 19, 2017, 02:11:14 PM
Quote from: Kitarn on November 19, 2017, 05:20:03 AM
Are you completely sure about that? I've placed four 1x1 ditches next to each other on a completely empty map and I still managed to get an arrow partly visible. Could it be that my terrainmod is at fault here? (Italia by C.P.)

Well an empty map has little to do with it, is that empty map completely level terrain is the real question?

If you are absolutely sure the terrain is flat, then you have a z-fighting issue here, which is related to your graphics card/drivers. Because the arrows may be close enough to the overlaid prop such that the height of them are only slightly apart. It's a well known problem that some setups can't correctly interpret such objects that are too close together on the Z axis, causing things that should be hidden to partially appear. If that's an issue for you then you can try another rendering option, DirectX should give the best results if you are not already using it. If that fails, you could try updating the drivers for the graphics card. However some setups simply can't be made to work around the problem entirely.

Since it would appear to be an issue with your setup, it's advisable to start there before simply working around the issue entirely.
Title: Re: Problem with the Neko Brook ditches
Post by: Kitarn on November 20, 2017, 06:55:54 AM
Thank you so much.  :thumbsup: Shifting to DirectX solved the problem. I had been playing in full-screen with software render mode as the game would not start in full-screen with DirectX. DirectX with Borderless did work however. Glad to finally start working on my city again!
Title: Re: Problem with the Neko Brook ditches
Post by: Kitarn on September 22, 2018, 11:16:04 AM
Bump!

I really love using the ditches, but unfortunately the autumn version really stands out. Is there a way to remove the seasonal change from a set?
Title: Re: Problem with the Neko Brook ditches
Post by: mgb204 on September 22, 2018, 01:42:28 PM
Can you clarify if you just want to remove once season or change the prop entirely from seasonal to non-seasonal?

If just removing one season, the simplest method is to make a copy of the S3Ds and FSH files of the season you want to use instead of autumn in a new .dat file. Change the IDs of them to match the autumn model, usually that just means adjusting the Group ID in Reader. Load this new .dat after the original models, it will override the autumn model and all currently plopped instances will change automatically.

You can change the Prop Exemplar from a timed/seasonal one (RTK 4) to a regular one (RTK 1) should you wish to make it non-seasonal. But doing this is more complicated, since you must ensure you remove all instances of the Prop from your game beforehand. Otherwise there is the risk of Prop Pox occurring. You could do the same as for altering one season, only use a copy of the one season you want for all seasons. You need one for each season you will be replacing, each with the IDs of the other seasons. For example, you have 3 seasons, Summer, Autumn and Winter and want to keep the Summer one only. Take two copies of the S3D/FSH of the Summer models, give one the ID of the Autumn and the other of the Winter model.
Title: Re: Problem with the Neko Brook ditches
Post by: Kitarn on September 23, 2018, 12:36:40 AM
QuoteCan you clarify if you just want to remove once season or change the prop entirely from seasonal to non-seasonal?
Both. The ditches have a summer and an autumn version. Removing the latter would essentially change the prop to non-seasonal, right?
Title: Re: Problem with the Neko Brook ditches
Post by: mgb204 on September 23, 2018, 07:04:15 AM
If you've only got two seasons, then take a copy of the S3D/FSH for the summer one and give them the ID of the autumn one. It's the best solution if you already have these placed in cities and will avoid potential prop pox issues.
Title: Re: Problem with the Neko Brook ditches
Post by: Kitarn on October 18, 2018, 09:25:14 AM
Quote from: mgb204 on September 23, 2018, 07:04:15 AM
If you've only got two seasons, then take a copy of the S3D/FSH for the summer one and give them the ID of the autumn one. It's the best solution if you already have these placed in cities and will avoid potential prop pox issues.
This sounded simple enough, but I can't seem to work out how to do it. Is there a guide for things like this, or could you give me a step-by-step of the process?

I apologize for all the (probably basic) questions. I really hope these aren't too annoying at this point.  &ops
Title: Re: Problem with the Neko Brook ditches
Post by: mgb204 on October 18, 2018, 03:34:46 PM
It's simple if you can "read the code" in Reader, otherwise it's just a load of items with funny Hex IDs. I'll go through one such set, doing that should give you a clearer idea of what you need to do.

Looking in the Models folder for the mod, you'll find what we need to edit. Those with specific "Fall and Spring" variants are the files you need to work with. For this example, that means the following:


See those numbers in the file names? Usefully Neko has left those, which will save a lot of time. But this isn't always the case, since they are labels, they don't actually get used from here. In essence, we'll replace the Fall variants with a copy of the Spring ones, so when they change to Fall, the Spring one will replace the Spring one. OK sounds a bit convoluted, but it's actually easier than altering how the props work to remove the seasons.

Because everything is in individual .SC4Model files, that process is made somewhat easier for us. We'll copy the Spring Model to make a duplicate file, Windows will name it by default as:
Neko_Brook_Grass_Spring-0x5ad0e817_0x5c80aec3_0x30000 - Copy.SC4Model
Look closely again at those numbers, they are the Type, Group (GID) and Instance IDs (IID), separated by underscores. See how only the GID is unique for each, the Type and Instance remains the same. This again will make life a lot easier, some models have unique IIDs, the process is quite different in such cases. A quick glance though and that's not an issue in this case.

So we'll copy the GID from the Fall model and give it to our new Copy. I'd do this by selecting the Fall model, press F2 (rename), CTRL + C (copy), then type x (anything will do), to rename the original fall model. Because we can't have two identically named files, this step is necessary. Then select the new Copy model, F2, CTRL + V (paste) and press enter, it now has the name the old Fall model did. But once again, SC4 doesn't read the file name, it reads the IDs of the files internally, we must now alter those if this is to work. To do that, we'll open up the new Fall model with Reader, but before we do, copy the GID from the filename. Again press F2, now select just this part after the 0x, i.e. "bc80af05" from the filename, it will be clear why shortly. Using Copy/Paste in this manner, we won't get any ID mishaps.

So now we open the file in reader:

Now you have a file with the Fall IDs, that shows the Spring model. Repeat this process for every such model where multiple seasons exist and everything should update automatically. Do make sure to remove the old Fall models from Plugins though, since otherwise you'll have files with conflicting (matching) IDs. One last tip, before you start, save a copy of the originals somewhere, just in case something goes wrong.
Title: Re: Problem with the Neko Brook ditches
Post by: Kitarn on October 19, 2018, 03:01:10 AM
There is no way I could have figured this out on my own. Thank you for taking the time to write up these steps!  &apls