Page 2 of 3 FirstFirst 123 LastLast
Results 16 to 30 of 31

Thread: Hub street layout adn what the commands mean.

  1. #16
    Reconstructionist Alphado-Jaki's Avatar
    Join Date
    Feb 2016
    Location
    Japan
    Posts
    676
    Rep Power
    1
    Thx for advise!

  2. #17
    Leader Tin's Avatar
    Join Date
    Feb 2014
    Location
    In between
    Posts
    5,287
    Rep Power
    1
    Quote Originally Posted by Alphado-Jaki View Post
    Thx for advise!
    Wasn't much advice but I'll take the TY

  3. #18
    Reconstructionist Alphado-Jaki's Avatar
    Join Date
    Feb 2016
    Location
    Japan
    Posts
    676
    Rep Power
    1
    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.

    Code:
    <street_gen level="20" length_multiplier="4">
    	<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>
    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? (This isn't only for Tin but for any of rwg-modder)

  4. #19
    Leader Tin's Avatar
    Join Date
    Feb 2014
    Location
    In between
    Posts
    5,287
    Rep Power
    1
    Quote Originally Posted by Alphado-Jaki View Post
    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.

    Code:
    <street_gen level="20" length_multiplier="4">
    	<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>
    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? (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
    Last edited by Tin; 09-04-2017 at 03:02 PM.

  5. #20
    Reconstructionist Alphado-Jaki's Avatar
    Join Date
    Feb 2016
    Location
    Japan
    Posts
    676
    Rep Power
    1
    Quote Originally Posted by Tin View Post
    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?

    Quote Originally Posted by Tin View Post
    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.
    I've tested around and I get some SS.

    Replace C to C : vanilla
    Spoiler: 


    Replace C to *
    Spoiler: 

    Replace C to K : intended?
    Spoiler: 


    Each of them are different from the others.
    Interesting thing is that 'C' seems to generate "something".

  6. #21
    Leader Tin's Avatar
    Join Date
    Feb 2014
    Location
    In between
    Posts
    5,287
    Rep Power
    1
    Quote Originally Posted by Alphado-Jaki View Post
    Oh, you think so too?



    Thanks, that's a nice idea.
    I've tested around and I get some SS.

    Replace C to C : vanilla
    Spoiler: 


    Replace C to *
    Spoiler: 

    Replace C to K : intended?
    Spoiler: 


    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.
    Last edited by Tin; 09-04-2017 at 05:11 PM.

  7. #22
    Reconstructionist Alphado-Jaki's Avatar
    Join Date
    Feb 2016
    Location
    Japan
    Posts
    676
    Rep Power
    1
    Quote Originally Posted by Tin View Post
    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.
    Spoiler: 

  8. #23
    Reconstructionist Alphado-Jaki's Avatar
    Join Date
    Feb 2016
    Location
    Japan
    Posts
    676
    Rep Power
    1
    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?

    Code:
    	<street_gen level="10" 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>

  9. #24
    Leader Tin's Avatar
    Join Date
    Feb 2014
    Location
    In between
    Posts
    5,287
    Rep Power
    1
    Quote Originally Posted by Alphado-Jaki View Post
    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?

    Code:
    	<street_gen level="10" 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,.
    Last edited by Tin; 09-07-2017 at 03:59 PM.

  10. #25
    Community Moderator Crater Creator's Avatar
    Join Date
    Apr 2016
    Posts
    3,169
    Rep Power
    1
    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.



    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.
    Spoiler: 
    Code:
    <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>
    Last edited by Crater Creator; 01-10-2018 at 11:13 AM. Reason: code formatting

  11. #26
    Colony Founder n2n1's Avatar
    Join Date
    Oct 2015
    Location
    MotherRussia
    Posts
    1,435
    Rep Power
    1
    i use this code for cross rurals:


    Code:
                <hub_rule name="ruralCross">
    			<hub_type value="rural"/>
    			<width value="400, 400" />
    			<height value="400, 400" />
    			<path_material value="gravel" />
    			<path_radius value="3" />
    			<prefab_rule name="prefabs_Rural_Cross"/>
    			<street_gen level="1" length_multiplier="8">
    				<axiom value="[FF]+[FF]+[FF]+[FF]"/>	
    			</street_gen>			
    		</hub_rule>

  12. #27
    Leader Tin's Avatar
    Join Date
    Feb 2014
    Location
    In between
    Posts
    5,287
    Rep Power
    1
    Quote Originally Posted by Crater Creator View Post
    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.



    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.
    Spoiler: 
    Code:
    		<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>
    Pretty sure (not positive), The main roads that join the hubs are random on how they attach so it's mostly hit or miss.

    What I use for cross streets is :
    Code:
    [-FFT][-FFT][-FFT]-FF
    and what n2n1 works as well.
    *Don't mind the "T" in those as I use that to attach the <rule char=/> and use those to build off of as well aside from the axiom.

    my full deal I use:
    Code:
    <street_gen level="20" length_multiplier="3">	<!-- street_gen= How many time the rules will get run through. length_multiplier= Each street sections length. -->
    			
    		<axiom value="[-FFT][-FFT][-FFT]-FF[+FFT][-FFT][-FFT]"/>   <!-- Main rule used for streets before using the rules -->
    				
    				
    				
    		<rule char="T" replace_with="[+FFF*][-FFF*][-FFF*]-FFF[+FFF*][-FFF*][-FFF*]"/>
    		<rule char="I" replace_with="[-FF*][-FF*][-FF*]-FF[+FF*][-FF*][-FF*]"/>
    		<rule char="N" replace_with="[FF*][-FF*][+FF*][--FF*][+FF*][-FF*][++FF*]"/> 						
    		<rule char="A" replace_with="[-FFFI][-FFFI][-FFFI]-FFF[+FFFI][-FFFI][-FFFI]"/> 					
    		<rule char="B" replace_with="[FFFF*][-FFFF*][+FFFF*][--FFFF*][+FFFF*][-FFFF*][++FFFF*]"/>
    		<rule char="C" replace_with="[FF+FF*][-FF+FF*][+FF+FF*][--FF+FF*][+FF+FF*][-FF+FF*][++FF+FF*]"/>
    		<rule char="D" replace_with="[FF-FF*][-FF-FF*][+FF-FF*][--FF-FF*][+FF-FF*][-FF-FF*][++FF-FF*]"/>
    		<rule char="E" replace_with="[FFF+F*][-FFF+F*][+FFF+F*][--FFF+F*][+FFF+F*][-FFF+F*][++FFF+F*]"/>
    		<rule char="G" replace_with="[FFF-F*][-FFF-F*][+FFF-F*][--FFF-F*][+FFF-F*][-FFF-F*][++FFF-F*]"/>
    				
    		<alt_commands chars="T,I,N,A,B,C,D,E,G"/>
    				
    	</street_gen>
    Builds some nice sectioned off areas and works well for smaller hubs as well as larger ones.
    Last edited by Tin; 01-10-2018 at 02:49 AM.

  13. #28
    Guppycurian Forum Whore Guppycur's Avatar
    Join Date
    Apr 2014
    Location
    Enemy for life
    Posts
    18,335
    Rep Power
    1
    Gimme a T. Gimmie an I. Gimme a...

  14. #29
    Community Moderator Crater Creator's Avatar
    Join Date
    Apr 2016
    Posts
    3,169
    Rep Power
    1
    So I adapted my rules to be more like n2n1's rule, and got somewhat better results. Specifically, the inter-hub roads seem to connect to the ends of my intersections more often, instead of the intersection being a shape that's just bolted on to the roads, and they are a more even mix of north-south and east-west roads, instead of most of them being diagonal. Thank you all. Updated code for anyone wanting something similar:
    Code:
    <hub_rule name="ruralCrossroads">
    
    	<hub_type value="rural"/>
    	<width value="240, 300" />
    	<height value="240, 300" />
    	<path_material value="asphalt" />
    	<path_radius value="6" />
    
    	<prefab_rule name="crossroadsPois"/>
    	
    	<street_gen level="1" length_multiplier="4">
    		<axiom value="*"/>
    
    		<rule char="A" replace_with="FFF"/> <!-- 	straight -->
    		<rule char="B" replace_with="[FF]+[FF]+[FF]"/> <!-- T intersection to the left -->
    		<rule char="C" replace_with="[FF]-[FF]-[FF]"/> <!-- T intersection to the right -->
    		<rule char="D" replace_with="F[-FF]F[+FF]F"/> <!-- offset crossroads A -->
    		<rule char="E" replace_with="F[+FF]F[-FF]F"/> <!-- offset crossroads B-->
    		<rule char="G" replace_with="[FF]+[FF]"/> <!-- turn right -->
    		<rule char="H" replace_with="[FF]-[FF]"/> <!-- turn left -->
    		<rule char="I" replace_with="[FF]+[FF]+[FF]+[FF]"/> <!-- 4-way intersection -->
    		<rule char="J" replace_with="[FF]-[FF]++[FF]"/> <!-- T intersection end -->
    		<alt_commands chars="A,B,C,D,E,G,H,I,J"/>
    	</street_gen>
    </hub_rule>

  15. #30
    Ranger
    Join Date
    Jul 2017
    Posts
    252
    Rep Power
    1
    I tried a world full of this:

    Code:
    <axiom value="[FFC][-FF.][+FF_][--FF ]"/>
    Now, some towns were connected by roads are spurious places, but this town had no connecting roads:

    Jitifeville.jpg

    So it seems to me that "C", or, perhaps, anything that is unknown, is simply a stop.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •