1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. I will no longer be hosting XLNation as of March 1, 2017. Unless some one steps forward to take over the domain name and provide hosting XLNation will shutdown. If you are seriously interested in taking on this project and can technically and financially support the project please contact me.

Road Think It's A Bridge

Discussion in 'General Forum' started by OokamiChan, Feb 9, 2015.

  1. OokamiChan

    OokamiChan Unskilled Worker

    Joined:
    Aug 25, 2014
    Messages:
    21
    Likes Received:
    7
    Hi all!

    I have a road in the game that thinks its a bridge in game. The class file looks right, it's a copy of a working road. I can't find any thing wrong with it, maybe any off you can find what is the problem.

    The icon I do get in the game is bridge to low icon. you can rise the road to any height and it will be the same error icon. I did have the same problem with another road piece but after all the bridge parts was right it started to work right. But this piece would not need a bridge due to the fact it's not used that much.
    But if the game demands a bridge then I will create a bridge.

    Game = CXXL

    Code:
    <?xml version="1.0" encoding="Windows-1252"?>
    <!-- 1 Lane motorway 1 lane off ramp -->
        <View>
            <Panel>BuildingSelection</Panel>
            <NameKey>&R_MW1LANE1OFF_81x40</NameKey>
            <!--<NameKey_Alt>&r_mw1Lane1off_8,1x40_BRIDGE</NameKey_Alt>-->
            <NameKeySim>&R_MW1LANE1OFF_81x40_SIM</NameKeySim>
            <DescriptionKey>&R_MW1LANE1OFF_81x40_DES</DescriptionKey>
            <Param1Key>&R_MOTORWAY_PARAM1</Param1Key>
            <Value1Key>&R_MOTORWAY_VALUE1</Value1Key>
            <Param2Key>&R_MOTORWAY_PARAM2</Param2Key>
            <Value2Key>&R_MOTORWAY_VALUE2</Value2Key>
            <Param3Key>&R_MOTORWAY_PARAM3</Param3Key>
            <Value3Key>&R_MOTORWAY_VALUE3</Value3Key>
            <PriceType>&TRESCHER</PriceType>
        </View>
        <Display>
            <Model>""</Model>
            <Placeholder>""</Placeholder>
            <Fundament>
                <Use>1</Use>
                <Model>""</Model>
            </Fundament>
            <EditModeOnly>0</EditModeOnly>
            <Thumb>Data\Interface\ddstexture\buildings\mw1lane1off.dds</Thumb>
        </Display>
        <TransportLine>
            <Dimension>40,7.6</Dimension>
            <_PavementWidth>0.25,0.25</_PavementWidth>
            <AllowIntersection>1</AllowIntersection>
            <AllowSnap>1</AllowSnap>
            <MaxLength>0</MaxLength>
            <MaxSlopeDeg>20</MaxSlopeDeg>
            <Type>0</Type>
            <InfoLane>
                <NbLaneSameSense>2</NbLaneSameSense>
                <NbLaneInverse>0</NbLaneInverse>
                <Capacity>208</Capacity>
            </InfoLane>
            <AltGroup>City51</AltGroup>
        </TransportLine>
        <Placement>
            <DelegatePrototype>data/design/buildings/construction/massplacementtool/multilines_citylink_highway.class</DelegatePrototype>
            <SubrogatedPrototype>""</SubrogatedPrototype>
            <Terraform>
                <Enabled>1</Enabled>
                <UseDefault>0</UseDefault>
                <DigDepth>0.01</DigDepth>
                <LevelWidth>10</LevelWidth>
                <CutWidth>0</CutWidth>
                <AngleMax>60</AngleMax>
                <HeightMax>20</HeightMax>
            </Terraform>
            <GroundType>TERRAIN</GroundType>
            <Type>ROAD</Type>
        </Placement>
        <Layouts>
            <LayoutFile1>Data/Design/layout/road/motorway/r_wy_mw1Lane1Off_6,6x40.layout</LayoutFile1>
            <!--<LayoutFile2>Data/Design/layout/road/motorway/.layout</LayoutFile2>-->
            <!--<LayoutFile3>Data/Design/layout/road/motorway/.layout</LayoutFile3>-->
            <LayoutFile5>Data/Design/layout/road/motorway/r_wy_mw1Lane1Off_6,6x40_empty.layout</LayoutFile5>
        </Layouts>
        <Tag>MS16;MS18;T1;GemCity;40x10;TransportLine;Highway;Curve;FastWay;FilterTag;Custom;LocaleChoice_Default;LocaleChoice_US;LocaleChoice_DE;LocaleChoice_FR</Tag>
        <Entity>
            <Type>ROADLINE</Type>
            <Serializable>0</Serializable>
        </Entity>
        <BudgetAgent>
            <UpkeepCost>15</UpkeepCost>
            <IsPublicBuilding>1</IsPublicBuilding>
            <BudgetExpenseCategory>TRANSPORT_ROAD</BudgetExpenseCategory>
        </BudgetAgent>
        <Conditions>
            <ConditionSet1>
                <ModeName>player_lock_all</ModeName>
                <ConstructionCost>130</ConstructionCost>
                <DestructionCost>52</DestructionCost>
                <UnlockConditions>
                    <NbCitizen>4751</NbCitizen>
                </UnlockConditions>
            </ConditionSet1>
            <ConditionSet2>
                <ModeName>player_lock_achievement</ModeName>
                <ConstructionCost>130</ConstructionCost>
                <DestructionCost>52</DestructionCost>
            </ConditionSet2>
        </Conditions>

    Regards
    OoakmiChan
     
  2. OokamiChan

    OokamiChan Unskilled Worker

    Joined:
    Aug 25, 2014
    Messages:
    21
    Likes Received:
    7
    Well adding a bridge to the road piece was a waste of time. The same error is still there.

    As you can see in the image below one can see both the road and the deck of the bridge. It's not the deck that I did for this road type but one that is smaller.

    Right now :bash:.

    Road_bridge.png

    Regards
    OokamiChan
     
  3. OokamiChan

    OokamiChan Unskilled Worker

    Joined:
    Aug 25, 2014
    Messages:
    21
    Likes Received:
    7
    Ok! spoke to soon. Forgot to add a tag in the class file.

    Fixed

    Next problem. Why cant my road connect to the games road?
    That one I have to think on some more.

    Regards
    OokamiChan
     
  4. Guillem

    Guillem Skilled Worker

    Joined:
    Dec 8, 2014
    Messages:
    33
    Likes Received:
    1
    I wonder why did the guys at Focus put a height limit to the bridge. It adds nothing (challenge is not the point) and it makes placing bridges super frustrating sometimes.
     
  5. barrakoda

    barrakoda Unskilled Worker

    Joined:
    Oct 13, 2014
    Messages:
    19
    Likes Received:
    16
    What was the tag you had to add?
     
  6. nicko2u

    nicko2u Governor

    Joined:
    Aug 22, 2014
    Messages:
    742
    Likes Received:
    1,053
    what bridge mod did you download lately that can cause that? all I can think is MrX bridge mods? apart from that I have no idea what your on about lol
     
  7. Mr.X²

    Mr.X² Moderator

    Joined:
    Aug 23, 2014
    Messages:
    1,071
    Likes Received:
    1,286
    why should my bridge mod causing a conflict with his motorway? o_O
    And cxxl is really weird with bridges..
     
  8. barrakoda

    barrakoda Unskilled Worker

    Joined:
    Oct 13, 2014
    Messages:
    19
    Likes Received:
    16
    I'm seeing the same thing, but only with RHM2 highways. I've been trying to debug it. That's why I was curious about the tag. Nicko's bridges (the elevated sectional-looking ones) work fine, so do the built in ones. I've attached the progress of my refactor (and excluded the sgbins, since I'm not editing those) but I broke something and the game crashes now on load.

    I did notice that the built-in highway tool automatically creates a bridge, but it is so broken and horrible for long spans. Unfortunately, at this point its the only think I know I can rely on. Anyone want to shed some light on the following things:

    Tags: I'm trying to just work on the 2-lane (40x16) highway from the RHM right now. I've been looking at tags from the core game and from Nicko's mod, but the highway stuff seems to be treated differently.
    <Tag>MS18;T3;TransportLine;RoadLine;RoadLine;Highway;40x15;BridgePlacement;GemCity;MS16;Curve;FastWay;LocaleChoice_Default;Custom;MSCUSTOM</Tag>

    Not sure if order matters with tags.
    Also, not sure what most of them do, but for all of this type of road, they seem to be Highway, FastWay, 40x15. The BridgePlacement one is mysterious to me. Makes me think it should be FastWayBridgePlacement since there is a FastWayBridge tag.

    I wish there was more debugging information or a more in-depth documentation about these class files than whats on wikia

    AltGroup: I've noticed that the 'AltGroup' tag for each different kind of road seem to follow a pattern. In this 40x16 RHM road, it starts City44 for the main flat road part. Then, for the bridge class, it defines City44Bridge.

    I wonder if we, as a community, should decide on a better naming convention for AltGroups so there arent conflicts between mods maybe. I think RHM_40x16 would make more sense than City44.


    Layout Files: Are the plugs used to determine what piece should follow when drawing a bridge or road or just how the pieces would connect? Layouts are next to impossible to debug by hand. Too many crazy numbers to look at, and it seems without order. Anybody have a tool that doesn't require 3dsmax to visualize/edit these?
     

    Attached Files:

  9. nicko2u

    nicko2u Governor

    Joined:
    Aug 22, 2014
    Messages:
    742
    Likes Received:
    1,053
    @MrX sorry wasn't trying to put blame on you. I just thought yours was last one created. Now I realise @barrakoda is trying to mod something. So really his issue not yours or mine :)

    Bridges work well for specific sizes only, prb same as roads unless you create all new models. From memory Naming conventions of files all play a role. Yes tags also play a role and usually new custom ones are needed, by both your files and latest UIM/Community Mod

    Bridges/roads etc. are mostly a pain in the butt to create.
     
  10. Mr.X²

    Mr.X² Moderator

    Joined:
    Aug 23, 2014
    Messages:
    1,071
    Likes Received:
    1,286
    may i ask which rhm you are about to edit? cause i already changed altgroups for bridges in official xxl release.. that makes normal road bridges upgradable to rhm bridges. And altgroups are good as they are in my opinion. they need to be universal to make all the different roads and bridges upgradable to each other. if youre going to set each road/bridge to its own altgroup you wont be able to upgrade them anymore ;)
    about layouts: nope, you need 3ds max (which you can get for free ;) ), but you wont be able to visualize them in max without having the original max file (or you try to recreate them). and im not 100% sure about that, but as far as i know a plug defines how pieces shall connect (bridges dont have plugs, no idea bout roads, but i guess roads have), what piece is going to follow on a bridge is set in layout and class file. (you can take a look at pjcs bridge tutorial if you want to know more bout that, its pretty good :) )
    the order of tags doesnt matter, it just matters which tags are in tag-line. to be honest: i also dont know what half of them do, i always use templates and then see by try'n'error wheter its working :D . maybe ask altiris bout tags, he usually has best idea bout this stuff here.
     
  11. barrakoda

    barrakoda Unskilled Worker

    Joined:
    Oct 13, 2014
    Messages:
    19
    Likes Received:
    16
    There are issues with the official release for XXL. I'm remodding it, and taking the time to reorganize the files and folders in the pak so it is easier to maintain. I didn't like the option of drawing regular bridges and then converting them into RHM bridges, and luckily, I seem to have figured out how to make it work normally again (like it did in XL Platinum). I'm also taking the time to correct some drawing issues for the bridges that were driving me nuts (mostly the piers).

    Thanks for the info on the tags. I did notice in some of the lua code that the game looks for sequences of tags in some cases. Like, TransportLine;RoadLine;Highway, but yeah it doesn't seem that the order matters. The style, size, and potentially file name (not verified) seem to pick the proper layouts. The other piece I wonder about is if tags match by 'string-begins-with' rather than a full string match.

    Other things I've gleaned;
    MS16 and MS18 are version tags, and are not needed for XXL
    FastWay and/or Highway is used for categorization in the UI
    Foundation;FoundationBridge and Foundation;FoundationTunnel are used to specify the class file is the foundation for the road with matching tags.
    Custom terraforming is painful, and better to leave to the game default
    SubrogatedPrototype (what the in game highways use, removes the distinction between bridge/road) is broken
    AltGroup definitely controls the upgrade variants, but the other tags need to match, and I think GemCity is required for this to work. (potentially another tag too, I think TransportLine)

    Anyway, I'm going to continue this over here and stop derailing the OP heh heh >> http://xlnation.city/threads/xxl-realistic-highway-mod-2.2538/page-5#post-18199
     

Share This Page