Jump to content

Hub street layout adn what the commands mean.


Tin

Recommended Posts

I ask Kinyajuu in a pm about the new hub system and he was kind enough to reply with some info on how it works to a degree. So here is what he relayed too me.

 

F = move forward in facing direction

+ = turn right 90 degrees

- = turn left 90 degrees

++= 180 degrees

--= 180 degress

[ = Save position and facing direction

] = return to last saved position and facing direction (if preceded by a [ )

* = pick from the alt_commands list

 

[[ can be used but ]] cannot.

example:

[FF+FF[FF+FF <- this can work

[] <- this can work also.

]FF <- nope can't start with ']'

or [FF+FF+FF]+FF] <- nope 2 ']' cannot work in succession.

would need to be [FF+FF+FF][+FF].

 

You can start a string like example(s):

++F

--F

F[F[-F]

*F

Depending how you make your rules you can even do:

***** as a rule or as part of your axiom.

 

Terrain is king. If the terrain is to rough, it won't develop the roads the way you want them sometimes not at all.

 

The axiom is your main street layout.

The rules are basically preset road additions.

and the '*' is a type of random pull from the <alt_commands> that are from the <rule char>.

 

Default already in the game:

<street_gen level="15" length_multiplier="4">

<axiom value="[FF*L]+[FFJK]+[FF*L]+[FFJK]"/>

<rule char="J" replace_with="[KYX*]"/>

<rule char="K" replace_with="[F+F-F]"/>

<rule char="L" replace_with="[*F]"/>

<rule char="Y" replace_with="-FF[YX]*"/>

<rule char="X" replace_with="+FF[XY]*"/>

<alt_commands chars="J,K,L,Y,X"/>

</street_gen>

 

So depending how robust and versatile your axiom is along with the rules, they can also affect how big the hubs 'MAY' get depending on the terrain.

*Note* Axioms can be used by themselves without reference to the rules.

So with the question

Q: Can Hubs generate bigger cities/towns

A: Yes! Depending on how rough the terrain is around where the hub is placed it can stunt it's growth.

 

*The flatter and more open the Terrain is, the more likely the hub is going to grow*

 

Pic of what can be accomplished (still a wip):

[ATTACH=CONFIG]21084[/ATTACH][ATTACH=CONFIG]21085[/ATTACH]

 

Edit: this is just a confirmation and further explanation on what StompNZ has already discovered.

Link to comment
Share on other sites

Alright Here is a first test run of a enhanced rwgmixer terrain adjustments (wip but should be less water over all and mountains toned down a bit.. hopefully!), poi distribution and hub street system for A16.

 

*This WILL Take a bit to load so be patient*

 

More hubs that are larger/(imo)Better poi distribution.

Terrain adjustments (still a wip)

 

*I have a pretty beefy rig so I hope this loads OK for most of you*

Have Fun!

[ATTACH]21093[/ATTACH]

Link to comment
Share on other sites

i7-5820k 3.3 GHz to 3.6Ghz boosted. (I do have a profile to OC the CPU to 4.6ghz but I don't use the profile for EA games)

15 MB L3 SmartCache, 68GB/s Max Memory Bandwidth

6 Cores with 12 Threads, Thermal Design Power 140W

HyperTthreading with Turbo Boost Technology

 

Extra just in case you're wondering:

32gb Quad channel Ram

1070 geforce GTX 8Gb GDDR5 <- again I do have a profile to OC the gpu but I don't use it for EA games.

Link to comment
Share on other sites

Thanks! This helped me a lot.

 

Question, except from terrain, what would stop your string? Let's say you have a string which would continue forever, but it will hit another road during it's expand, will it stop at that point then? Or will something else?

I have tried a couple of things, but can't seem find a reason for the city to stop expand. It almost feels like the city wont grow, unless the random set of strings fills out the entire hub. But I can't find that logic at all.

 

Again thanks a bunch! You helped me getting a good start on this :)

Link to comment
Share on other sites

i7-5820k 3.3 GHz to 3.6Ghz boosted. (I do have a profile to OC the CPU to 4.6ghz but I don't use the profile for EA games)

15 MB L3 SmartCache, 68GB/s Max Memory Bandwidth

6 Cores with 12 Threads, Thermal Design Power 140W

HyperTthreading with Turbo Boost Technology

 

Extra just in case you're wondering:

32gb Quad channel Ram

1070 geforce GTX 8Gb GDDR5 <- again I do have a profile to OC the gpu but I don't use it for EA games.

 

Show off!!! haha j/k

Link to comment
Share on other sites

i7-5820k 3.3 GHz to 3.6Ghz boosted. (I do have a profile to OC the CPU to 4.6ghz but I don't use the profile for EA games)

15 MB L3 SmartCache, 68GB/s Max Memory Bandwidth

6 Cores with 12 Threads, Thermal Design Power 140W

HyperTthreading with Turbo Boost Technology

 

Extra just in case you're wondering:

32gb Quad channel Ram

1070 geforce GTX 8Gb GDDR5 <- again I do have a profile to OC the gpu but I don't use it for EA games.

 

Thanks.

I believe that the i7 for the vast majority of games not needed, enough i5...

but, i can't figure out - how need a i7 for 7dtd...

You made a conscious choice in favor of the i7 ? :)

Link to comment
Share on other sites

Thanks.

I believe that the i7 for the vast majority of games not needed, enough i5...

but, i can't figure out - how need a i7 for 7dtd...

You made a conscious choice in favor of the i7 ? :)

 

I just picked the i7 because in general (not playing games, well minus music) I have multiple programs usually running. Music/Unity/Assorted paint programs/web browser and usually switch between them often. Having the extra cores makes running the extra task easier and quicker.

Link to comment
Share on other sites

  • 3 weeks later...
  • 3 weeks later...

1 question. If you don't mind, help me please.

 

[FF+FF+FF]+FF] <- nope 2 ']' cannot work in succession.

would need to be [FF+FF+FF][+FF]

 

Is this mean that "once road has returned ( ']' ) to the existing saved position ( '[' ), it is discarded. If you wanna return again, you should specify new saved position."?

Link to comment
Share on other sites

1 question. If you don't mind, help me please.

 

 

 

Is this mean that "once road has returned ( ']' ) to the existing saved position ( '[' ), it is discarded. If you wanna return again, you should specify new saved position."?

 

It'll actually give you and error when trying to load it. It might just be something that needs more refining on Kinyajuu's part. I just know it doesn't work :) But yeah pretty much.

Link to comment
Share on other sites

  • 1 month later...

I'm not sure this is one of bugs or features, so I post this here at first.

 

This is the street gen from rwgmixer on vanilla.

There are char 'C' but no rule for 'C' is defined.

 

<street_gen level="20" length_multiplier="4">
<axiom value="[FF[color="#0000FF"]C[/color]T][-FFT][+FFI][--FFN][+FFT][-FFI][++FN][F-FF+FF[-T]FF+FF+FFFF-FF-FF[+I]FF-F[+N]"/>

<rule char="T" replace_with="F-FF+FF[-T**]FF+FF+FFFF-FF-FF[+I**]FF-F[+N*K]"/>
<rule char="I" replace_with="F-FF+FF[-T**]FF+FF+FFFF-FF-FF[+I**]FF-F[+N*K]"/>
<rule char="N" replace_with="F-FF+FF[-T**]FF+FF+FFFF-FF-FF[+I**]FF-F[+N*K]"/>
<rule char="K" replace_with="[FF[color="#0000FF"]C[/color]T][-FFT][+FFI][--FFN][+FFT][-FFI][++FN]"/>
<alt_commands chars="T,I,N,K"/>
</street_gen>

 

I've done some tests and realized undefined chars in axiom / rule make NO error. (generated successfully)

Therefore, I couldn't determine that "'C' is typo of 'K'" or "'C' is new built-in char as well as 'F', '+', '[', and etc."

 

Do you have any idea? :upset: (This isn't only for Tin but for any of rwg-modder)

Link to comment
Share on other sites

I'm not sure this is one of bugs or features, so I post this here at first.

 

This is the street gen from rwgmixer on vanilla.

There are char 'C' but no rule for 'C' is defined.

 

<street_gen level="20" length_multiplier="4">
<axiom value="[FF[color="#0000FF"]C[/color]T][-FFT][+FFI][--FFN][+FFT][-FFI][++FN][F-FF+FF[-T]FF+FF+FFFF-FF-FF[+I]FF-F[+N]"/>

<rule char="T" replace_with="F-FF+FF[-T**]FF+FF+FFFF-FF-FF[+I**]FF-F[+N*K]"/>
<rule char="I" replace_with="F-FF+FF[-T**]FF+FF+FFFF-FF-FF[+I**]FF-F[+N*K]"/>
<rule char="N" replace_with="F-FF+FF[-T**]FF+FF+FFFF-FF-FF[+I**]FF-F[+N*K]"/>
<rule char="K" replace_with="[FF[color="#0000FF"]C[/color]T][-FFT][+FFI][--FFN][+FFT][-FFI][++FN]"/>
<alt_commands chars="T,I,N,K"/>
</street_gen>

 

I've done some tests and realized undefined chars in axiom / rule make NO error. (generated successfully)

Therefore, I couldn't determine that "'C' is typo of 'K'" or "'C' is new built-in char as well as 'F', '+', '[', and etc."

 

Do you have any idea? :upset: (This isn't only for Tin but for any of rwg-modder)

 

My guess it's a typo. They also may have played around with other rules and decided to not use them and it just got left in <shrug>

 

You can also add '.''_' [spaces] and can kinda use then as a [stop] or [end] for streets as well.

 

edit: Replace the 'C' with a '*' and see what you get. Might as well make it do something ;)

Link to comment
Share on other sites

My guess it's a typo. They also may have played around with other rules and decided to not use them and it just got left in <shrug>

 

Oh, you think so too?

 

You can also add '.''_' [spaces] and can kinda use then as a [stop] or [end] for streets as well.

 

edit: Replace the 'C' with a '*' and see what you get. Might as well make it do something ;)

 

Thanks, that's a nice idea. :D

I've tested around and I get some SS.

 

Replace C to C : vanilla

 

 

r2rZB6s.jpg

 

Replace C to *

 

TgofjyC.jpg

 

Replace C to K : intended?

 

T5yFngy.jpg

 

 

Each of them are different from the others.

Interesting thing is that 'C' seems to generate "something".

Link to comment
Share on other sites

Oh, you think so too?

 

 

 

Thanks, that's a nice idea. :D

I've tested around and I get some SS.

 

Replace C to C : vanilla

 

 

r2rZB6s.jpg

 

Replace C to *

 

TgofjyC.jpg

 

Replace C to K : intended?

 

T5yFngy.jpg

 

 

Each of them are different from the others.

Interesting thing is that 'C' seems to generate "something".

 

Yeah, idk. I think it's acting like a [stop] function like "." or "_" or "<space>" Which is allowing it to generate streets better in some cases.

Putting the 'K' in it's place actually stunted the growth some but the "*" seems a touch more robust than the others. Have you tried taking the "C" out and seeing what you get? That would be the last thing I would try.

Link to comment
Share on other sites

Yeah, idk. I think it's acting like a [stop] function like "." or "_" or "<space>" Which is allowing it to generate streets better in some cases.

Putting the 'K' in it's place actually stunted the growth some but the "*" seems a touch more robust than the others. Have you tried taking the "C" out and seeing what you get? That would be the last thing I would try.

 

Yep. I've tested with any chars that I feel as "special char". =P

Such as the lowercases of defined alphabets (f t i n k), '?', '@', '#', '\' (backslash), '<space>', '.', numbers, and also 4-byte char '海' (this is the char in my language).

 

These results are same as one of "C" for this hub.

Probably, a [stop] function needs some particular hub / rule.

 

Taking the "C" out also seems like same thing in this case.

 

MV2KTFq.jpg

 

Link to comment
Share on other sites

Also, I have messed around "level" parameter.

I've thought as something related with angle of street.

 

Though..., editing this has no noticeable change for me. :/

Negative number, Zero, really higher number such as 999999, and even strings "ABCDEFG".

 

Maybe...., not working for now?

 

	<street_gen [color="#0000CD"]level="10"[/color] length_multiplier="4"> <!-- This -->
	<axiom value="[FFCT][-FFT][+FFI][--FFN][+FFT][-FFI][++FN][F-FF+FF[-T]FF+FF+FFFF-FF-FF[+I]FF-F[+N]"/>

	<rule char="T" replace_with="F-FF+FF[-T**]FF+FF+FFFF-FF-FF[+I**]FF-F[+N*K]"/>
	<rule char="I" replace_with="F-FF+FF[-T**]FF+FF+FFFF-FF-FF[+I**]FF-F[+N*K]"/>
	<rule char="N" replace_with="F-FF+FF[-T**]FF+FF+FFFF-FF-FF[+I**]FF-F[+N*K]"/>
	<rule char="K" replace_with="[FFCT][-FFT][+FFI][--FFN][+FFT][-FFI][++FN]"/>
	<alt_commands chars="T,I,N,K"/>
</street_gen>

Link to comment
Share on other sites

Also, I have messed around "level" parameter.

I've thought as something related with angle of street.

 

Though..., editing this has no noticeable change for me. :/

Negative number, Zero, really higher number such as 999999, and even strings "ABCDEFG".

 

Maybe...., not working for now?

 

	<street_gen [color="#0000CD"]level="10"[/color] length_multiplier="4"> <!-- This -->
	<axiom value="[FFCT][-FFT][+FFI][--FFN][+FFT][-FFI][++FN][F-FF+FF[-T]FF+FF+FFFF-FF-FF[+I]FF-F[+N]"/>

	<rule char="T" replace_with="F-FF+FF[-T**]FF+FF+FFFF-FF-FF[+I**]FF-F[+N*K]"/>
	<rule char="I" replace_with="F-FF+FF[-T**]FF+FF+FFFF-FF-FF[+I**]FF-F[+N*K]"/>
	<rule char="N" replace_with="F-FF+FF[-T**]FF+FF+FFFF-FF-FF[+I**]FF-F[+N*K]"/>
	<rule char="K" replace_with="[FFCT][-FFT][+FFI][--FFN][+FFT][-FFI][++FN]"/>
	<alt_commands chars="T,I,N,K"/>
</street_gen>

 

That is stating how many times the rules gets pulled through the axiom if I'm not mistaken. From what I've been told it has no limit (well next to no limit) on how big you make it. I assume with using the negatives it's doing a revers count. so 0 -1 -2 -3 etc,.

Link to comment
Share on other sites

  • 4 months later...

Thanks for sharing all this!

 

I'm trying to create some teeny tiny 'towns', that would frequently be just one intersection, like the rural hubs in older alphas. I think I've got a handle on the street generation for hubs, but what about the roads that connect hubs? How does it choose where to connect to the city roads? Will it only connect to '*'s in the rules as connection points, for example?

 

What I'd like to do is have a library of basic intersections - I, L, T, and + shapes - and then the game makes a number of hub-connecting roads based on the type of intersection it's using, or vice versa. But it kind of looks like we don't control when and where these hub-connecting roads appear. At best, I'm getting results like this, where the intersection is sometimes offset so as to make extra roads.

 

66625D6BD43C78F88B87800BDF32D3EC79C49AE3

 

Does anybody understand why the north-south road in this image is connecting to the east end of the town instead of using the north and south ends? Or am I not even looking at this correctly?

 

Here's the generator I'm using.

 

<hub_rule name="ruralCrossroads">

<hub_type value="town"/>
<width value="200, 400" />
<height value="200, 400" />
<path_material value="gravel" />
<path_radius value="6" />


<prefab_rule name="crossroadsPois"/>

<street_gen level="1" length_multiplier="6">
	<axiom value="F*F"/>

	<rule char="A" replace_with="FF"/> <!-- 	straight -->
	<rule char="B" replace_with="[-FF*]"/> <!-- T intersection to the left -->
	<rule char="C" replace_with="[+FF*]"/> <!-- T intersection to the right -->
	<rule char="D" replace_with="[-F*]F[+F*]"/> <!-- offset crossroads A -->
	<rule char="E" replace_with="[+F*]F[-F*]"/> <!-- offset crossroads B-->
	<rule char="G" replace_with="F+F*"/> <!-- turn right -->
	<rule char="H" replace_with="F-F*"/> <!-- turn left -->
	<rule char="I" replace_with="[-FF*][+FF*]"/> <!-- 4-way intersection -->
	<rule char="J" replace_with="[-F*][+F*]++"/> <!-- T intersection end -->
	<alt_commands chars="A,B,C,D,E,G,H,I,J"/>
</street_gen>

 

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...