Skip to content

Commit

Permalink
Added dockyard plots to RoPP
Browse files Browse the repository at this point in the history
  • Loading branch information
jwvhewitt committed Dec 22, 2024
1 parent 99565e5 commit 868a28c
Show file tree
Hide file tree
Showing 32 changed files with 1,207 additions and 102 deletions.
23 changes: 22 additions & 1 deletion data/stc_majornpcs.txt
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ Character
renown=65
birth_year=107
combatant=False
faction=TheSolarNavy
mecha_colors=(DeepSeaBlue, Jade, OrangeRed, GullGrey, GunRed)
mecha_pref="SAN-D1 Daum"

Expand All @@ -139,6 +140,7 @@ Character
renown=65
birth_year=114
combatant=False
faction=TerranDefenseForce
mecha_colors=(ArmyDrab, Olive, ElectricYellow, GullGrey, Chocolate)
mecha_pref="SAN-D1 Daum"

Expand Down Expand Up @@ -170,6 +172,7 @@ Character
renown=85
birth_year=93
combatant=True
faction=Guardians
mecha_colors=(BattleshipGrey, PrussianBlue, BrightRed, WarmGrey, Black)
mecha_pref="SAN-D1 Daum"

Expand All @@ -186,6 +189,7 @@ Character
renown=90
birth_year=84
combatant=True
faction=TreasureHunters
mecha_colors=(Charcoal, Saffron, OrangeRed, SlateGrey, HeavyPurple)
mecha_pref="SAN-D1 Daum"

Expand All @@ -201,14 +205,15 @@ Character
renown=80
birth_year=128
combatant=True
faction=AegisOverlord
mecha_colors=(Charcoal, Saffron, OrangeRed, SlateGrey, HeavyPurple)
mecha_pref="SAN-D1 Daum"

Character
name = "Carnelio"
mnpcid = "Carnelio"
statline = {Reflexes=15, Body=16, Speed=17, Perception=12, Knowledge=14, Craft=6, Ego=13, Charm=13}
colors = (HeavyPurple, MediumSkin, Beige, Saffron, PirateSunrise)
colors = (PirateSunrise, MediumSkin, Beige, Saffron, StarViolet)
personality=[Cheerful, Sociable, Glory, L5DustyRing]
portrait='card_m_jjangbogo.png'
gender=Nonbinary
Expand All @@ -219,3 +224,19 @@ Character
mecha_colors=(Charcoal, Saffron, OrangeRed, SlateGrey, HeavyPurple)
mecha_pref="SAN-D1 Daum"

Character
name = "Segard"
mnpcid = "CaptainSegard"
statline = {Reflexes=20, Body=12, Speed=13, Perception=11, Knowledge=14, Craft=8, Ego=17, Charm=15}
colors = (MidnightBlue, ForRami, Ebony, Gold, GriffinGreen)
personality=[Passionate, Sociable, Justice, L5DustyRing]
gender=Male
job=PirateCaptain
renown=65
birth_year=116
combatant=True
faction=BladesOfCrihna
mecha_colors=(MidnightBlue, GriffinGreen, PirateSunrise, Black, StarViolet)
mecha_pref="SAN-D1 Daum"
portrait = card_m_captainsegard.png

3 changes: 3 additions & 0 deletions game/combat/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -603,6 +603,9 @@ def go(self):
print(self.camp.fight.cstat[self.pc]._ap_remaining,self.camp.fight.cstat[self.pc].action_points, -self.camp.fight.cstat[self.pc]._mp_spent, self.camp.fight.cstat[self.pc].mp_remaining, self.camp.fight.cstat[self.pc].total_mp_remaining)
elif gdi.unicode == "W" and pbge.util.config.getboolean("GENERAL", "dev_mode_on"):
self.camp.check_trigger("CHEATINGFUCKINGBASTARD")
elif gdi.unicode == "L" and pbge.util.config.getboolean("GENERAL", "dev_mode_on"):
for pc in self.camp.get_active_party():
self.camp.scene.contents.remove(pc.get_root())
elif gdi.unicode == "!" and pbge.util.config.getboolean("GENERAL", "dev_mode_on"):
myparty = self.camp.get_active_party()
myparty.remove(self.pc)
Expand Down
2 changes: 2 additions & 0 deletions game/content/ghplots/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
from . import lancedev
from . import lancedev_objectives
from . import lancemates
from . import lanceutil
from . import localproblems
from . import mechadungeons
from . import military_places
Expand Down Expand Up @@ -101,6 +102,7 @@ def harvest(mod):
harvest(lancedev)
harvest(lancedev_objectives)
harvest(lancemates)
harvest(lanceutil)
harvest(localproblems)
harvest(mechadungeons)
harvest(military_places)
Expand Down
29 changes: 17 additions & 12 deletions game/content/ghplots/challengeplots.py
Original file line number Diff line number Diff line change
Expand Up @@ -513,11 +513,12 @@ def NPC_offers(self, camp):
subject=self, subject_start=True
))

mylist.append(Offer(
"[IWillSendMissionDetails]; [GOODLUCK]",
ContextTag([context.ACCEPT]), effect=self.activate_mission,
subject=self
))
if not camp.is_favorable_to_pc(self.elements["ENEMY_FACTION"]):
mylist.append(Offer(
"[IWillSendMissionDetails]; [GOODLUCK]",
ContextTag([context.ACCEPT]), effect=self.activate_mission,
subject=self
))

mylist.append(Offer(
"[UNDERSTOOD] [GOODBYE]",
Expand All @@ -535,8 +536,11 @@ def t_UPDATE(self,camp):
if self.mission_seed.ended:
self.end_plot(camp)

def activate_mission(self,camp):
def activate_mission(self,camp: gears.GearHeadCampaign):
self.mission_active = True
allied_faction = self.elements["NPC"].faction
if allied_faction and camp.are_faction_enemies(allied_faction, self.elements["ENEMY_FACTION"]):
camp.faction_relations[allied_faction].pc_relation = gears.factions.FactionRelations.ALLY
missionbuilder.NewMissionNotification(self.mission_seed.name, self.elements["MISSION_GATE"])

def MISSION_GATE_menu(self, camp, thingmenu):
Expand Down Expand Up @@ -896,11 +900,12 @@ def NPC_offers(self, camp):
subject=self, subject_start=True
))

mylist.append(Offer(
"[IWillSendMissionDetails]; [GOODLUCK]",
ContextTag([context.ACCEPT]), effect=self.activate_mission,
subject=self
))
if not camp.is_favorable_to_pc(self.elements["ENEMY_FACTION"]):
mylist.append(Offer(
"[IWillSendMissionDetails]; [GOODLUCK]",
ContextTag([context.ACCEPT]), effect=self.activate_mission,
subject=self
))

ghdialogue.SkillBasedPartyReply(
Offer(
Expand Down Expand Up @@ -984,7 +989,7 @@ def custom_init(self, nart: GHNarrativeRequest):
allied_faction=npc.faction,
enemy_faction=plotutility.RandomBanditCircle(nart.camp), rank=self.rank,
objectives=[missionbuilder.BAMO_DEFEAT_THE_BANDITS, missionbuilder.BAMO_RECOVER_CARGO],
one_chance=True,
one_chance=True, make_enemies=False,
scenegen=sgen, architecture=archi, mission_grammar=mgram,
cash_reward=120,
on_win=self._win_the_mission, defeat_trigger_on=False
Expand Down
4 changes: 1 addition & 3 deletions game/content/ghplots/challengeutils.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
import random
import game.content
import gears
import pbge
from game.content import gharchitecture, plotutility, dungeonmaker, ghwaypoints, adventureseed, ghcutscene, ghterrain, \
ghchallenges
from game.content import ghchallenges
from game import teams, ghdialogue
from game.ghdialogue import context
from pbge.dialogue import Offer, ContextTag
Expand Down
14 changes: 8 additions & 6 deletions game/content/ghplots/dd_homebase.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ def custom_init(self, nart):
# tplot = self.add_sub_plot(nart, "TEST_CHAR_MOVER")
self.add_sub_plot(nart, "DZD_BLACK_ISLE_PUB")
self.add_sub_plot(nart, "RANDOM_SHOP")
self.add_sub_plot(nart, "TEST_SHOP", necessary=False)
# Hwang-Sa Mission
# Reconstruction Site
tplot = self.add_sub_plot(nart, "QOL_REPORTER")
Expand Down Expand Up @@ -1059,13 +1060,14 @@ def DISPATCHER_offers(self, camp: gears.GearHeadCampaign):
)
)

mylist.append(
Offer(
"{}. You can start the mission by heading to the West Gate.".format(self.mission_description),
context=ContextTag([context.ACCEPT, ]), subject=self, effect=self._activate_mission,
data={"enemy_faction": self.next_enemy_faction.name}
if not camp.is_favorable_to_pc(self.next_enemy_faction):
mylist.append(
Offer(
"{}. You can start the mission by heading to the West Gate.".format(self.mission_description),
context=ContextTag([context.ACCEPT, ]), subject=self, effect=self._activate_mission,
data={"enemy_faction": self.next_enemy_faction.name}
)
)
)

mylist.append(
Offer(
Expand Down
16 changes: 8 additions & 8 deletions game/content/ghplots/dd_intro.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import pbge
import random
from game import teams,ghdialogue
from game.content import gharchitecture,ghterrain,ghwaypoints,backstory
from game.content import gharchitecture,ghterrain,ghwaypoints,ghwaypoints
from pbge.dialogue import Offer, ContextTag, Reply
from game.ghdialogue import context
from game.content.ghcutscene import SimpleMonologueDisplay
Expand All @@ -24,7 +24,7 @@ class DZDIntro_GetInTheMekShimli(Plot):
"DEBRIEFING_MISSION": "I'd like for you to head to Wujung. Hire some lancemates. Find someone who can help us with our energy problems. Then come back here and we'll see if we can put a permanent stop to those raiders."
}
@classmethod
def matches( self, pstate: pbge.plots.PlotState ):
def matches( cls, pstate: pbge.plots.PlotState ):
"""Returns True if this plot matches the current plot state."""
return not pstate.adv.world.pc.has_badge("Criminal")

Expand All @@ -50,7 +50,7 @@ def custom_init( self, nart ):
self.adv = pbge.plots.Adventure(world=myscene)

myroom = self.register_element("_EROOM",pbge.randmaps.rooms.ClosedRoom(10,7),dident="LOCALE")
myent = self.register_element( "ENTRANCE", game.content.ghwaypoints.Waypoint(anchor=pbge.randmaps.anchors.middle), dident="_EROOM")
myent = self.register_element( "ENTRANCE", pbge.scenes.waypoints.Waypoint(anchor=pbge.randmaps.anchors.middle), dident="_EROOM")
mychute = self.register_element("CHUTE",ghwaypoints.BoardingChute(plot_locked=True),dident="_EROOM")
myroom.contents.append(ghwaypoints.ClosedBoardingChute())
myroom.contents.append(ghwaypoints.VentFan())
Expand Down Expand Up @@ -255,7 +255,7 @@ class DZDIntro_CousinIntro(DZDIntro_GetInTheMekShimli):
scope = True

@classmethod
def matches( self, pstate: pbge.plots.PlotState ):
def matches( cls, pstate: pbge.plots.PlotState ):
"""Returns True if this plot matches the current plot state."""
return gears.personality.DeadZone in pstate.adv.world.pc.personality

Expand Down Expand Up @@ -353,7 +353,7 @@ class DZDIntro_SoldierIntro(DZDIntro_GetInTheMekShimli):
}

@classmethod
def matches( self, pstate: pbge.plots.PlotState ):
def matches( cls, pstate: pbge.plots.PlotState ):
"""Returns True if this plot matches the current plot state."""
return pstate.adv.world.pc.has_badge("Soldier")

Expand Down Expand Up @@ -458,7 +458,7 @@ class DZDIntro_PopStarIntro(DZDIntro_GetInTheMekShimli):
}

@classmethod
def matches( self, pstate: pbge.plots.PlotState ):
def matches( cls, pstate: pbge.plots.PlotState ):
"""Returns True if this plot matches the current plot state."""
return pstate.adv.world.pc.has_badge("Pop Star")

Expand Down Expand Up @@ -573,7 +573,7 @@ class DZDIntro_NotSoSmoothCriminal(DZDIntro_GetInTheMekShimli):


@classmethod
def matches( self, pstate: pbge.plots.PlotState ):
def matches( cls, pstate: pbge.plots.PlotState ):
"""Returns True if this plot matches the current plot state."""
return pstate.adv.world.pc.has_badge("Criminal")

Expand Down Expand Up @@ -749,7 +749,7 @@ def custom_init( self, nart ):
player_a,enemy_a = random.choice(pbge.randmaps.anchors.OPPOSING_PAIRS)

self.register_element("_EROOM",pbge.randmaps.rooms.OpenRoom(5,5,anchor=player_a),dident="LOCALE")
myent = self.register_element( "ENTRANCE", game.content.ghwaypoints.Waypoint(anchor=pbge.randmaps.anchors.middle), dident="_EROOM")
myent = self.register_element( "ENTRANCE", pbge.scenes.waypoints.Waypoint(anchor=pbge.randmaps.anchors.middle), dident="_EROOM")

enemy_room = self.register_element("ENEMY_ROOM",game.content.ghrooms.MSRuinsRoom(15,15,anchor=enemy_a),dident="LOCALE")
team2 = self.register_element("_eteam",teams.Team(enemies=(myscene.player_team,)),dident="ENEMY_ROOM")
Expand Down
28 changes: 14 additions & 14 deletions game/content/ghplots/lancemates.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from game.content.plotutility import LMSkillsSelfIntro
from game.content import backstory
from pbge.plots import Plot, Rumor
from pbge.dialogue import Offer, ContextTag, Reply
from pbge.dialogue import Offer, ContextTag
from game.ghdialogue import context
import gears
import game.content.gharchitecture
Expand Down Expand Up @@ -118,7 +118,7 @@ class DeadzonerInGreenZoneLancemate(Plot):
UNIQUE = True

@classmethod
def matches(self, pstate):
def matches(cls, pstate):
"""Returns True if this plot matches the current plot state."""
return gears.personality.GreenZone in pstate.elements["METROSCENE"].attributes

Expand All @@ -142,7 +142,7 @@ class GladiatorLancemate(Plot):
UNIQUE = True

@classmethod
def matches(self, pstate):
def matches(cls, pstate):
"""Returns True if this plot matches the current plot state."""
return gears.personality.DeadZone in pstate.elements["METROSCENE"].attributes

Expand All @@ -158,7 +158,7 @@ def custom_init(self, nart):
self.add_sub_plot(nart, "RLM_Relationship")
return True

def _is_best_scene(self, nart, candidate: gears.GearHeadScene):
def _is_best_scene(self, nart, candidate):
return isinstance(candidate, gears.GearHeadScene) and gears.tags.SCENE_PUBLIC in candidate.attributes


Expand All @@ -167,7 +167,7 @@ class MutantLancemate(Plot):
UNIQUE = True

@classmethod
def matches(self, pstate):
def matches(cls, pstate):
"""Returns True if this plot matches the current plot state."""
return {gears.personality.GreenZone, gears.personality.DeadZone}.intersection(
pstate.elements["METROSCENE"].attributes)
Expand Down Expand Up @@ -289,7 +289,7 @@ class RLM_Beginner(Plot):
)

@classmethod
def matches(self, pstate):
def matches(cls, pstate):
"""Returns True if this plot matches the current plot state."""
return pstate.elements["NPC"].renown < 25

Expand Down Expand Up @@ -382,7 +382,7 @@ class RLM_Medic(Plot):
)

@classmethod
def matches(self, pstate):
def matches(cls, pstate):
"""Returns True if this plot matches the current plot state."""
return pstate.elements["NPC"].job and gears.tags.Medic in pstate.elements["NPC"].job.tags

Expand Down Expand Up @@ -445,7 +445,7 @@ class RLM_Mercenary(Plot):
)

@classmethod
def matches(self, pstate):
def matches(cls, pstate):
"""Returns True if this plot matches the current plot state."""
return pstate.elements["NPC"].job and {gears.tags.Adventurer, gears.tags.Military}.intersection(
pstate.elements["NPC"].job.tags)
Expand Down Expand Up @@ -507,7 +507,7 @@ class RLM_Professional(Plot):
)

@classmethod
def matches(self, pstate):
def matches(cls, pstate):
"""Returns True if this plot matches the current plot state."""
return pstate.elements["NPC"].renown > 35

Expand Down Expand Up @@ -828,7 +828,7 @@ class RLM_HauntedByTyphon(Plot):
)

@classmethod
def matches(self, pstate):
def matches(cls, pstate):
"""Returns True if this plot matches the current plot state."""
return gears.personality.GreenZone in pstate.elements["NPC"].personality

Expand Down Expand Up @@ -936,7 +936,7 @@ class RLM_MechaOtaku(Plot):
)

@classmethod
def matches(self, pstate):
def matches(cls, pstate):
"""Returns True if this plot matches the current plot state."""
return pstate.elements["NPC"].statline[gears.stats.Knowledge] > 12

Expand All @@ -960,9 +960,9 @@ def NPC_offers(self, camp: gears.GearHeadCampaign):
context=ContextTag((context.HELLO,)), subject=npc, subject_start=True
))

pcmek: gears.base.Mecha = camp.get_pc_mecha(camp.pc)
pcmek = camp.get_pc_mecha(camp.pc)
if pcmek:
engine, gyro = pcmek.get_engine_rating_and_gyro_status()
engine, _gyro = pcmek.get_engine_rating_and_gyro_status()
if engine > 1700:
opinion = "That makes it one of the most powerful mecha out there. When an engine that size blows up, it's really something."
elif engine > 1100:
Expand Down Expand Up @@ -1066,7 +1066,7 @@ class RLM_FarmKid(Plot):
)

@classmethod
def matches(self, pstate):
def matches(cls, pstate):
"""Returns True if this plot matches the current plot state."""
return "METROSCENE" in pstate.elements and gears.tags.Village in pstate.elements["METROSCENE"].attributes

Expand Down
Loading

0 comments on commit 868a28c

Please sign in to comment.