Navigation

    TripleA Logo

    TripleA Forum

    • Register
    • Login
    • Search
    • TripleA Website
    • Categories
    • Recent
    • Popular
    • Users
    • Groups
    • Tags

    A new option for factories

    Map Making
    8
    55
    9148
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Schulz
      Schulz last edited by

      Factories can be captured by enemy but never be used by enemies. Is there ay specific code for this kind of feature?

      Hepps 1 Reply Last reply Reply Quote 0
      • Hepps
        Hepps Moderators @Schulz last edited by

        @Schulz You could just have the unit set to change upon capture into an "enemy Factory" (which of course isn't a factory at all). Then you could set that unit to turn into a normal factory when captured by the original team.

        1 Reply Last reply Reply Quote 2
        • Schulz
          Schulz last edited by

          I really didn't understand you mean manually editing?

          Hepps 1 Reply Last reply Reply Quote 0
          • Hepps
            Hepps Moderators @Schulz last edited by Hepps

            @Schulz Ok.

            So you set up your Factory unit as you normally would... But in the attachments you add...

            whenCapturedChangesInto values: allows a unit to change into a different unit when captured from a specific player to a specific player. "fromPlayer:toPlayer:transferAttributes:unitType:numberOfUnits". accepts "any" instead of a player name. allows multiple.
            examples: <option name="whenCapturedChangesInto" value="any:any:true:Minor_Factory:1"/> and <option name="whenCapturedChangesInto" value="Russians:Germans:false:gold:3:lumber:1"/>

            For your purposes the attachment would be something like this...

            <option name="whenCapturedChangesInto" value="any:any:true:Enemy_Factory:1"/>

            However the unit "Enemy_Factory" would actually just be set up as an infrastructure unit with no production abilities at all.

            Additionally the "Enemy_Factory" would have the same attachment added to it as above but in reverse... changing back to a normal Factory when it is captured by the original alliance.

            It means each Nation on either side of the conflict would need both units in their Unit list.

            1 Reply Last reply Reply Quote 1
            • Schulz
              Schulz last edited by

              Looks way too complex for me. Anyway I find another way. Making every units separate for countries like germanInfantry or britishInfantry than setting up placement rules.

              Hepps 1 Reply Last reply Reply Quote 0
              • Hepps
                Hepps Moderators @Schulz last edited by

                @Schulz That actually WAYYYYY more work. But whatever floats your boat.

                1 Reply Last reply Reply Quote 1
                • Schulz
                  Schulz last edited by

                  Or could it work something like this: Making destroyable factory cost 0 with construction rules. Player can rebuild it after retaking territories.

                  Hepps 1 Reply Last reply Reply Quote 0
                  • Hepps
                    Hepps Moderators @Schulz last edited by

                    @Schulz So is a captured factory supposed to build nothing at all?

                    prastle 1 Reply Last reply Reply Quote 0
                    • prastle
                      prastle Moderators Admin @Hepps last edited by

                      @Hepps Cor. He wants Slash and Burn but amazingly rebuilt if recaptured?

                      1 Reply Last reply Reply Quote 0
                      • Schulz
                        Schulz last edited by

                        My aim is just at least partly representing of logisics and increasing other strategies by decreasing stacking around factories. Capturing enemy factory is huge deal and impossible to recapture them in current engine.

                        Yes definitely you should unable to purchase any unit from captured factories.

                        Hepps 1 Reply Last reply Reply Quote 0
                        • Hepps
                          Hepps Moderators @Schulz last edited by

                          @Schulz Well differences in views aside. The mechanic would be pretty easy to make.

                          Then you could have something like this to distinguish the 2

                          Function vs not.png

                          1 Reply Last reply Reply Quote 2
                          • Frostion
                            Frostion Admin last edited by

                            @Schulz
                            I can give you yet an example of the whenCapturedChangesInto feature that @Hepps has presented. Maybe you will find it useful.

                            In my new WoW map I use buildings that change type depending on who owns/captures them. One of them is an “Alliance-Stronghold”. Basically it is a city with Alliance supporters that only the Alliance players that can make good use of by getting free units every turn.

                            If enemy players capture the building called “Alliance-Stronghold” it turns into a “Suppressed-Alliance-Stronghold”, another unit type with different properties. If the building is again liberated, it turns back into the useful Alliance building again.

                            The unit(s) can look like this:

                                <attachment name="unitAttachment" attachTo="Alliance-Stronghold" javaClass="games.strategy.triplea.attachments.UnitAttachment" type="unitType">
                                    <option name="isInfrastructure" value="true"/>
                                    <option name="createsUnitsList" value="1:Alliance-Footmen"/>
                                    <option name="whenCapturedChangesInto" value="any:Orcs:false:Suppressed-Alliance-Stronghold:1"/>
                                    <option name="whenCapturedChangesInto" value="any:Tauren:false:Suppressed-Alliance-Stronghold:1"/>
                                    <option name="whenCapturedChangesInto" value="any:Trolls:false:Suppressed-Alliance-Stronghold:1"/>
                                    <option name="whenCapturedChangesInto" value="any:Undead:false:Suppressed-Alliance-Stronghold:1"/>
                                </attachment>
                            
                            
                                <attachment name="unitAttachment" attachTo="Suppressed-Alliance-Stronghold" javaClass="games.strategy.triplea.attachments.UnitAttachment" type="unitType">
                                    <option name="isInfrastructure" value="true"/>
                                    <option name="createsResourcesList" value="3:PUs"/>
                                    <option name="whenCapturedChangesInto" value="any:Dwarves:false:Alliance-Stronghold:1"/>
                                    <option name="whenCapturedChangesInto" value="any:Gnomes:false:Alliance-Stronghold:1"/>
                                    <option name="whenCapturedChangesInto" value="any:Humans:false:Alliance-Stronghold:1"/>
                                    <option name="whenCapturedChangesInto" value="any:Night-Elves:false:Alliance-Stronghold:1"/>
                                </attachment>
                            Hepps 1 Reply Last reply Reply Quote 5
                            • Hepps
                              Hepps Moderators @Frostion last edited by

                              @Frostion A better example could nary be found!

                              1 Reply Last reply Reply Quote 0
                              • Schulz
                                Schulz last edited by

                                Lets assume using v341 map its default factory:

                                <attachment name="unitAttachment" attachTo="factory" javaClass="games.strategy.triplea.attachments.UnitAttachment" type="unitType">
                                <option name="isFactory" value="true"/>
                                </attachment>

                                Should I create 2 separate type factories for both axis and allies or need separate factories for each nations?

                                Axis Factory example;

                                <attachment name="unitAttachment" attachTo="axisfactory" javaClass="games.strategy.triplea.attachments.UnitAttachment" type="unitType">
                                <option name="isFactory" value="true"/>
                                <option name="isInfrastructure" value="true"/>
                                <option name="whenCapturedChangesInto" value="any:infantry:false:supressedaxisfactory:1"/>
                                <option name="whenCapturedChangesInto" value="any:artillery:false:supressedaxisfactory:1"/>
                                <option name="whenCapturedChangesInto" value="any:armour:false:supressedaxisfactory:1"/>
                                </attachment>

                                <attachment name="unitAttachment" attachTo="supressedaxisfactory" javaClass="games.strategy.triplea.attachments.UnitAttachment" type="unitType">
                                <option name="isInfrastructure" value="true"/>
                                <option name="createsResourcesList" value="3:PUs"/>
                                <option name="whenCapturedChangesInto" value="any:infantry:false:axisfactory:1"/>
                                <option name="whenCapturedChangesInto" value="any:artillery:false:axisfactory:1"/>
                                <option name="whenCapturedChangesInto" value="any:armour:false:axisfactory:1"/>
                                </attachment>

                                also need any property (boolean)?

                                Thanks for good explanation.

                                Hepps 1 Reply Last reply Reply Quote 0
                                • Hepps
                                  Hepps Moderators @Schulz last edited by Hepps

                                  @Schulz I think for your purposes each nation would simply need a Factory and a Suppressed_Factory. I don't think you need to create the extra details since nothing in V3 is that complex.

                                  The other thing is you should only need...

                                  <option name="whenCapturedChangesInto" value="any:any:false:suppressed_factory:1"/>

                                  and for the other...

                                  <option name="whenCapturedChangesInto" value="any:any:false:factory :1"/>

                                  The second qualifying component (which you have defined as different units) is not a unit type that is capturing the territory, but rather a faction or nation... so unless you want a factory which is captured by say... Russia to have some other result other than creating a
                                  suppressed_factory... then the above will work perfectly.

                                  1 Reply Last reply Reply Quote 0
                                  • Schulz
                                    Schulz last edited by

                                    In v3 map every nation have the same units but I need to customize them for apply this feature. I've copied NML's purchase model but it didn't work.

                                    Any way to implement this feature by just one factory? Ex: One factory and one supressed factory?

                                    1 Reply Last reply Reply Quote 0
                                    • Schulz
                                      Schulz last edited by

                                      It gives this error when I tried to set up factories:

                                      Unexpected Exception while setting values for attachmentUnitAttachment attached to:UnitType{name=factory} with name:unitAttachment

                                      Probably need additional property.

                                      Hepps 1 Reply Last reply Reply Quote 0
                                      • Hepps
                                        Hepps Moderators @Schulz last edited by

                                        @Schulz If you send me the map package... knowing what you want... I can most likely get you to the finish line.

                                        1 Reply Last reply Reply Quote 0
                                        • Schulz
                                          Schulz last edited by

                                          https://www.sendspace.com/file/6w0okc

                                          Hepps redrum RogerCooper 3 Replies Last reply Reply Quote 1
                                          • Hepps
                                            Hepps Moderators @Schulz last edited by

                                            @Schulz Will look at it at the first opportunity.

                                            1 Reply Last reply Reply Quote 0
                                            • 1
                                            • 2
                                            • 3
                                            • 1 / 3
                                            • First post
                                              Last post
                                            Copyright © 2016-2018 TripleA-Devs | Powered by NodeBB Forums