Exemple #1
0
    def custom_init(self, nart):
        team1 = teams.Team(name="Player Team")
        team2 = teams.Team(name="Civilian Team", allies=(team1,))
        town_fac = self.register_element( "METRO_FACTION",
            gears.factions.Circle(nart.camp,parent_faction=gears.factions.DeadzoneFederation,name="the {} Council".format(self.elements["DZ_TOWN_NAME"]))
        )
        myscene = gears.GearHeadScene(50, 50, self.elements["DZ_TOWN_NAME"], player_team=team1, civilian_team=team2,
                                      scale=gears.scale.HumanScale, is_metro=True,
                                      faction=town_fac,
                                      attributes=(
                                      gears.personality.DeadZone, gears.tags.City, gears.tags.SCENE_PUBLIC))
        myscene.exploration_music = 'Good Night.ogg'

        for t in range(random.randint(1,3)):
            npc = gears.selector.random_character(50, local_tags=myscene.attributes)
            npc.place(myscene, team=team2)

        myscenegen = pbge.randmaps.CityGridGenerator(myscene, gharchitecture.HumanScaleGreenzone(),
                                                     road_terrain=ghterrain.Flagstone)

        self.register_scene(nart, myscene, myscenegen, ident="LOCALE")
        self.register_element("METRO", myscene.metrodat)

        myroom2 = self.register_element("_ROOM2", pbge.randmaps.rooms.Room(3, 3, anchor=pbge.randmaps.anchors.east),
                                        dident="LOCALE")
        towngate = self.register_element("ENTRANCE", DZDRoadMapExit(roadmap=self.elements["DZ_ROADMAP"],
                                                                    node=self.elements["DZ_NODE"],name="The Highway",
                                                                    desc="The highway stretches far beyond the horizon, all the way back to the green zone.",
                                                                    anchor=pbge.randmaps.anchors.east,
                                                                    plot_locked=True), dident="_ROOM2")
        # Gonna register the entrance under another name for the subplots.
        self.register_element("MISSION_GATE", towngate)
        self.register_element("METROSCENE", myscene)

        mystory = self.register_element("BACKSTORY",backstory.Backstory(commands=("DZTOWN_FOUNDING",),elements={"LOCALE":self.elements["LOCALE"]}))

        team3 = teams.Team(name="Sheriff Team", allies=(team1,team2))
        myroom2.contents.append(team3)

        self.first_quest_done = False

        # Gonna store this town in the campdata, so it can be accessed elsewhere.
        nart.camp.campdata["DISTANT_TOWN"] = myscene
        nart.camp.campdata["DISTANT_TEAM"] = team3

        # Add the services.
        tplot = self.add_sub_plot(nart, "DZRS_ORDER")
        tplot = self.add_sub_plot(nart, "DZRS_GARAGE")
        tplot = self.add_sub_plot(nart, "DZRS_HOSPITAL")
        tplot = self.add_sub_plot(nart, "TAVERN")

        # Record the tavern scene
        self.elements["TAVERN"] = tplot.elements["LOCALE"]

        # Add the local tarot.
        #threat_card = nart.add_tarot_card(self, (game.content.ghplots.dd_tarot.MT_THREAT,), )
        #game.content.mechtarot.Constellation(nart, self, threat_card, threat_card.get_negations()[0], steps=3)

        return True
 def custom_init(self, nart):
     npc: gears.base.Character = nart.camp.egg.seek_dramatis_person(nart.camp, self._is_good_npc, self)
     if npc:
         scene = self.seek_element(nart, "LOCALE", self._is_best_scene, scope=self.elements["METROSCENE"])
         self.register_element("NPC", npc, dident="LOCALE")
         #print(npc,scene)
         self.bs = backstory.Backstory(("LONGTIMENOSEE",),keywords=[t.name.upper() for t in npc.get_tags()])
     return npc
Exemple #3
0
 def __str__(self):
     if not self.text:
         myeffect = get_element_effect(self.npc, ME_PERSON,
                                       list(self.camp.active_plots()))
         mystory = backstory.Backstory(("ME_LIABILITY_FOR_PERSON", ),
                                       {ME_PERSON: self.npc},
                                       myeffect.get_keywords())
         self.text = mystory.get()
     return self.text
    def custom_init(self, nart):
        town_name = self._generate_town_name()
        town_fac = self.register_element(
            "METRO_FACTION",
            gears.factions.Circle(
                nart.camp,
                parent_faction=gears.factions.DeadzoneFederation,
                name="the {} Council".format(town_name)))
        team1 = teams.Team(name="Player Team")
        team2 = teams.Team(name="Civilian Team",
                           allies=(team1, ),
                           faction=town_fac)

        myscene = gears.GearHeadScene(50,
                                      50,
                                      town_name,
                                      player_team=team1,
                                      civilian_team=team2,
                                      scale=gears.scale.HumanScale,
                                      is_metro=True,
                                      faction=town_fac,
                                      attributes=(gears.personality.DeadZone,
                                                  gears.tags.City,
                                                  gears.tags.SCENE_PUBLIC))
        myscene.exploration_music = 'Komiku_-_06_-_Friendss_theme.ogg'

        npc = gears.selector.random_character(50,
                                              local_tags=myscene.attributes)
        npc.place(myscene, team=team2)

        npc2 = gears.selector.random_character(
            50,
            local_tags=myscene.attributes,
            job=gears.jobs.choose_random_job(
                (gears.tags.Laborer, ), self.elements["LOCALE"].attributes))
        npc2.place(myscene, team=team2)

        defender = self.register_element(
            "DEFENDER",
            gears.selector.random_character(
                self.rank,
                local_tags=self.elements["LOCALE"].attributes,
                job=gears.jobs.choose_random_job(
                    (gears.tags.Police, ), self.elements["LOCALE"].attributes),
                faction=town_fac))
        defender.place(myscene, team=team2)

        myscenegen = pbge.randmaps.CityGridGenerator(
            myscene,
            gharchitecture.HumanScaleGreenzone(),
            road_terrain=ghterrain.Flagstone)

        self.register_scene(nart, myscene, myscenegen, ident="LOCALE")

        mystory = self.register_element(
            "BACKSTORY",
            backstory.Backstory(commands=("DZTOWN_FOUNDING", ),
                                elements={"LOCALE": self.elements["LOCALE"]}))

        self.register_element("METRO", myscene.metrodat)
        self.register_element("METROSCENE", myscene)
        self.register_element("DZ_NODE_FRAME", RoadNode.FRAME_TOWN)

        myroom2 = self.register_element("_ROOM2",
                                        pbge.randmaps.rooms.Room(
                                            3,
                                            3,
                                            anchor=pbge.randmaps.anchors.east),
                                        dident="LOCALE")
        towngate = self.register_element(
            "ENTRANCE",
            DZDRoadMapExit(
                roadmap=self.elements["DZ_ROADMAP"],
                node=self.elements["DZ_NODE"],
                name="The Highway",
                desc=
                "The highway stretches far beyond the horizon, all the way back to the green zone.",
                anchor=pbge.randmaps.anchors.east,
                plot_locked=True),
            dident="_ROOM2")
        # Gonna register the entrance under another name for the subplots.
        self.register_element("MISSION_GATE", towngate)

        # Add the order. This subplot will add a leader, guards, police, and backstory to the town.
        tplot = self.add_sub_plot(nart, "DZRS_ORDER")

        # Add the services.
        tplot = self.add_sub_plot(nart, "DZRS_GARAGE")
        tplot = self.add_sub_plot(nart, "DZRS_HOSPITAL")
        #tplot = self.add_sub_plot(nart, "DZDHB_EliteEquipment")
        #tplot = self.add_sub_plot(nart, "DZDHB_BlueFortress")
        #tplot = self.add_sub_plot(nart, "DZDHB_BronzeHorseInn")
        #tplot = self.add_sub_plot(nart, "DZDHB_LongRoadLogistics")
        tplot = self.add_sub_plot(nart, "QOL_REPORTER")

        self.add_sub_plot(nart, "RANDOM_LANCEMATE")

        # Add the local tarot.
        threat_card = nart.add_tarot_card(self, (tarot_cards.MT_THREAT, ))
        mechtarot.Constellation(nart, self, threat_card,
                                threat_card.get_negations()[0])

        return True