Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- """
- Evennia - Ainneve Project.
- Batchcode: Central Area of Riverport.
- M - L - K
- \ | X | \
- H - I - J
- | X | X |
- G - F - E
- | | |
- A* - B - C - D
- |
- N
- \
- O
- A - Kai River Bridge * Starting Location I - Meadow Room #5
- B - Eastern Road Segment #1 J - Meadow Room #6
- C - Eastern Road Segment #2 K - Meadow Room #7
- D - Eastern Road Segment #3 L - Meadow Room #8
- E - Meadow Room #1 M - Meadow Room #9
- F - Meadow Room #2 N - Shrine Path
- G - Meadow Room #3 O - Shrine Entrance
- H - Meadow Room #4 O - Shrine of Grass
- This is a batch file utilised by the batchcode processor to build your game
- externally. The batchcode processor lets you use Evennia's API to code your
- world in full-fledged Python code. For more information see:
- https://github.com/evennia/evennia/wiki/Batch-Code-Processor
- To use:
- # From a superuser account in game.
- @batchcode path.to.batchcodefile
- Where path.to.batchcodefile is the path to a batch-code file. Such a file
- should have a name ending in ".py" (but you shouldn't include that in the
- path). The path is given like a python path relative to a folder you define
- to hold your batch files, set by BATCH_IMPORT_PATH in your settings. Default
- folder is (assuming your game is called "mygame") mygame/world/. So if you
- want to run the example batch file in mygame/world/batch_code.py, you could
- simply use
- @batchcode batch_code
- """
- from evennia import create_object
- from typeclasses import rooms, exits
- # INITIAL ROOM SETUP
- # Rooms will be cross referenced throughout the batch file, such as in exits.
- # To avoid referencing non-existent rooms they should be created first.
- bridge = create_object(rooms.Room, key="Kai River Bridge",
- aliases=["riverport#01"])
- road1 = create_object(rooms.Room, key="Along the Road",
- aliases=["riverport#02"])
- road2 = create_object(rooms.Room, key="Along the Road",
- aliases=["riverport#03"])
- road3 = create_object(rooms.Room, key="Along the Road",
- aliases=["riverport#04"])
- meadow1 = create_object(rooms.Room, key="Grassy Meadow",
- aliases=["riverport#05"])
- meadow2 = create_object(rooms.Room, key="Grassy Meadow",
- aliases=["riverport#06"])
- meadow3 = create_object(rooms.Room, key="Grassy Meadow",
- aliases=["riverport#07"])
- meadow4 = create_object(rooms.Room, key="Grassy Meadow",
- aliases=["riverport#08"])
- meadow5 = create_object(rooms.Room, key="Meadow Oak",
- aliases=["riverport#09"])
- meadow6 = create_object(rooms.Room, key="Grassy Meadow",
- aliases=["riverport#10"])
- meadow7 = create_object(rooms.Room, key="Grassy Meadow",
- aliases=["riverport#11"])
- meadow8 = create_object(rooms.Room, key="Shadowy Grove",
- aliases=["riverport#12"])
- meadow9 = create_object(rooms.Room, key="Grassy Meadow",
- aliases=["riverport#13"])
- shrine1 = create_object(rooms.Room, key="A Dirt Path",
- aliases=["riverport#14"])
- shrine2 = create_object(rooms.Room, key="The Grassy Knoll",
- aliases=["riverport#15"])
- shrine3 = create_object(rooms.Room, key="Shrine of Grass",
- aliases=["riverport#16"])
- # INDIVIDUAL ROOM SETUP
- # Now we can move through each room and fill in the details.
- """
- A - Kai River Bridge * Starting Location
- A* - B
- """
- # ROOM DETAILS
- bridge.db.desc = """\
- You stand in the middle of an ancient |wbridge|n spanning the |gKai River|n.
- The |wriver|n runs from the north to the south, and a well-traveled |wroad|n
- runs east and west.
- """
- bridge.db.terrain = "EASY"
- bridge.tags.add("riverport", category="zone")
- bridge.db.details["bridge"] = """\
- The heavy timbers of the bridge appear sturdy enough to allow a merchant's
- cart to cross. The wood is carved ornately and is covered in undulating
- patterns of texture.
- """
- bridge.db.details["river"] = """\
- Looking north, you see the river as it winds its way through the town
- of Riverport. A small island dotted with trees appears to your left
- not far away, and beyond it, a second bridge in the northern section of
- the city.
- Looking south, the |gKai|n heads toward its destination, the placid
- |gAiiro Lake|n.
- """
- bridge.db.details["road"] = """\
- To the |weast|n, the town's main road stretches out before you, leading
- past the river's edge and through a clearing in the trees that stand
- restfully along the banks of the Kai.
- To the |wwest|n in the distance, you can see |gZodiac Square|n, the
- commercial center of Riverport.
- """
- # EXITS
- bridge_ex1 = create_object(exits.Exit, key="East", aliases=["e"],
- location=bridge, destination=road1)
- # NPCS/OBJECTS
- """
- B - Eastern Road Segment #1
- G
- |
- A* - B - C
- |
- N
- """
- # ROOM DETAILS
- road1.db.desc = """\
- The road stretches on to the east and west. Surrounded by green meadows
- on either side, the paving stones of this stretch of road are worn, but
- well-maintained. In the distance, you hear the sound of burbling water
- coming from the |gRiver Kai|n.
- To the north, a grassy meadow extends along the banks of the |gKai|n.
- """
- road1.db.terrain = "EASY"
- road1.tags.add("riverport", category="zone")
- # EXITS
- road1_ex1 = create_object(exits.Exit, key="North", aliases=["n"],
- location=road1, destination=meadow3)
- road1_ex2 = create_object(exits.Exit, key="East", aliases=["e"],
- location=road1, destination=road2)
- road1_ex3 = create_object(exits.Exit, key="South", aliases=["s"],
- location=road1, destination=shrine1)
- road1_ex4 = create_object(exits.Exit, key="West", aliases=["w"],
- location=road1, destination=bridge)
- # NPCS/OBJECTS
- """
- C - Eastern Road Segment #2
- F
- |
- B - C - D
- """
- # ROOM DETAILS
- road2.db.desc = """\
- The road stretches on to the east and west. Surrounded by green meadows
- on either side, the paving stones of this stretch of road are worn, but
- well-maintained.
- """
- road1.db.terrain = "EASY"
- road1.tags.add("riverport", category="zone")
- # EXITS
- road2_ex1 = create_object(exits.Exit, key="North", aliases=["n"],
- location=road2, destination=meadow2)
- road2_ex2 = create_object(exits.Exit, key="East", aliases=["e"],
- location=road2, destination=road3)
- road2_ex3 = create_object(exits.Exit, key="West", aliases=["w"],
- location=road2, destination=road1)
- # NPCS/OBJECTS
- """
- D - Eastern Road Segment #3
- E
- |
- C - D
- """
- # ROOM DETAILS
- road3.db.desc = """\
- The road stretches on to the east and west. Surrounded by green meadows
- on either side, the paving stones of this stretch of road are worn, but
- well-maintained.
- """
- road3.db.terrain = "EASY"
- road3.tags.add("riverport", category="zone")
- # EXITS
- road3_ex1 = create_object(exits.Exit, key="North", aliases=["n"],
- location=road3, destination=meadow1)
- road3_ex2 = create_object(exits.Exit, key="West", aliases=["w"],
- location=road3, destination=road2)
- # NPCS/OBJECTS
- """
- E - Meadow Room #1
- I - J
- | X |
- F - E
- |
- D
- """
- # ROOM DETAILS
- meadow1.db.desc = """\
- A carpet of grass spreads out before you, bordered on the south edge by
- the main road of Riverport.
- """
- meadow1.db.terrain = "EASY"
- meadow1.tags.add("riverport", category="zone")
- # EXITS
- meadow1_ex1 = create_object(exits.Exit, key="North", aliases=["n"],
- location=meadow1, destination=meadow6)
- meadow1_ex2 = create_object(exits.Exit, key="South", aliases=["s"],
- location=meadow1, destination=road3)
- meadow1_ex3 = create_object(exits.Exit, key="West", aliases=["w"],
- location=meadow1, destination=meadow2)
- meadow1_ex4 = create_object(exits.Exit, key="North West", aliases=["nw"],
- location=meadow1, destination=meadow5)
- # NPCS/OBJECTS
- """
- F - Meadow Room #2
- H - I - J
- | X | X |
- G - F - E
- |
- C
- """
- # ROOM DETAILS
- meadow2.db.desc = """\
- A carpet of grass spreads out before you, bordered on the south edge by
- the main road of Riverport. To the north, you see a large tree in the
- distance.
- """
- meadow2.db.terrain = "EASY"
- meadow2.tags.add("riverport", category="zone")
- # EXITS
- meadow2_ex1 = create_object(exits.Exit, key="North", aliases=["n"],
- location=meadow2, destination=meadow5)
- meadow2_ex2 = create_object(exits.Exit, key="North East", aliases=["ne"],
- location=meadow2, destination=meadow6)
- meadow2_ex3 = create_object(exits.Exit, key="East", aliases=["e"],
- location=meadow2, destination=meadow1)
- meadow2_ex4 = create_object(exits.Exit, key="South", aliases=["s"],
- location=meadow2, destination=road2)
- meadow2_ex5 = create_object(exits.Exit, key="West", aliases=["w"],
- location=meadow2, destination=meadow3)
- meadow2_ex6 = create_object(exits.Exit, key="North West", aliases=["nw"],
- location=meadow2, destination=meadow4)
- # NPCS/OBJECTS
- """
- G - Meadow Room #3
- H - I
- | X |
- G - F
- |
- B
- """
- # ROOM DETAILS
- meadow3.db.desc = """\
- Bordered to the west by the murmuring waters of the |gRiver Kai|n, this sun
- drenched meadow is carpeted with short grass. Along the river bank, tall
- reeds no doubt hide the homes of river-going critters.
- To the south, you see the main road that passes through the center of
- Riverport.
- """
- meadow3.db.terrain = "EASY"
- meadow3.tags.add("riverport", category="zone")
- # EXITS
- meadow3_ex1 = create_object(exits.Exit, key="North", aliases=["n"],
- location=meadow3, destination=meadow4)
- meadow3_ex2 = create_object(exits.Exit, key="North East", aliases=["ne"],
- location=meadow3, destination=meadow5)
- meadow3_ex3 = create_object(exits.Exit, key="East", aliases=["e"],
- location=meadow3, destination=meadow2)
- meadow3_ex4 = create_object(exits.Exit, key="South", aliases=["s"],
- location=meadow3, destination=road1)
- # NPCS/OBJECTS
- """
- H - Meadow Room #4
- M - L - K
- \ | X |
- H - I
- | X |
- G - F
- """
- # ROOM DETAILS
- meadow4.db.desc = """\
- Bordered to the west by the murmuring waters of the |gRiver Kai|n, this sun
- drenched meadow is carpeted with short grass. Along the river bank, tall
- reeds no doubt hide the homes of river-going critters.
- """
- meadow4.db.terrain = "EASY"
- meadow4.tags.add("riverport", category="zone")
- # EXITS
- meadow4_ex1 = create_object(exits.Exit, key="North", aliases=["n"],
- location=meadow4, destination=meadow8)
- meadow4_ex2 = create_object(exits.Exit, key="North East", aliases=["ne"],
- location=meadow4, destination=meadow7)
- meadow4_ex3 = create_object(exits.Exit, key="East", aliases=["e"],
- location=meadow4, destination=meadow5)
- meadow4_ex4 = create_object(exits.Exit, key="South East", aliases=["se"],
- location=meadow4, destination=meadow2)
- meadow4_ex5 = create_object(exits.Exit, key="South", aliases=["s"],
- location=meadow4, destination=meadow3)
- meadow4_ex6 = create_object(exits.Exit, key="North West", aliases=["nw"],
- location=meadow4, destination=meadow9)
- # NPCS/OBJECTS
- """
- I - Meadow Room #5
- L - K
- | X |
- H - I - J
- | X | X |
- G - F - E
- """
- # ROOM DETAILS
- meadow5.db.desc = """\
- A massive broad-leafed tree stands in the middle of a carpet of green grass.
- A light breeze wafts through its branches, and you hear the gentle rustling
- of leaves from above.
- The steady presence of this tree fills you with a sense of serenity despite
- a dark and shady-looking grove of trees to the northwest.
- """
- meadow5.db.terrain = "EASY"
- meadow5.tags.add("riverport", category="zone")
- meadow5.db.details["tree"] = """\
- The tree's huge trunk is far too big for a normal-sized human to reach their
- arms around. It is by far the tallest structure in central Riverport.
- """
- # EXITS
- meadow5_ex1 = create_object(exits.Exit, key="North", aliases=["n"],
- location=meadow5, destination=meadow7)
- meadow5_ex2 = create_object(exits.Exit, key="East", aliases=["e"],
- location=meadow5, destination=meadow6)
- meadow5_ex3 = create_object(exits.Exit, key="South East", aliases=["se"],
- location=meadow5, destination=meadow1)
- meadow5_ex4 = create_object(exits.Exit, key="South", aliases=["s"],
- location=meadow5, destination=meadow2)
- meadow5_ex5 = create_object(exits.Exit, key="South West", aliases=["sw"],
- location=meadow5, destination=meadow3)
- meadow5_ex6 = create_object(exits.Exit, key="West", aliases=["w"],
- location=meadow5, destination=meadow4)
- meadow5_ex7 = create_object(exits.Exit, key="North West", aliases=["nw"],
- location=meadow5, destination=meadow8)
- # NPCS/OBJECTS
- # TODO
- """
- # add a testing NPC wolf
- @spawn "WOLF"
- #
- # set his sdesc; this is unfortunate
- #
- @py w=me.search("wolf"); w.sdesc.add("Ol' Scurvy")
- #
- @desc Ol' Scurvy = Wretched and fearsome-looking, the wolf growls as the fur
- on its back|/bristles at the sight of hapless travelers.
- #
- # give him a weapon
- #
- @create/drop a vicious bite;jaws:typeclasses.weapons.TwoHandedWeapon
- #
- @set jaws/slots = ['wield']
- #
- @py t=me.search('jaws');w=me.search("Ol' Scurvy");t.move_to(w, quiet=True);
- me.msg(w.equip.add(t))
- """
- """
- J - Meadow Room #6
- K
- | \
- I - J
- | X |
- F - E
- """
- # ROOM DETAILS
- meadow6.db.desc = """\
- A carpet of grass spreads out before you, bordered on the east edge by
- the ring road of Riverport. To the west, you see a large tree in the
- distance.
- """
- meadow6.db.terrain = "EASY"
- meadow6.tags.add("riverport", category="zone")
- # EXITS
- meadow6_ex1 = create_object(exits.Exit, key="South", aliases=["s"],
- location=meadow6, destination=meadow1)
- meadow6_ex2 = create_object(exits.Exit, key="South West", aliases=["se"],
- location=meadow6, destination=meadow2)
- meadow6_ex3 = create_object(exits.Exit, key="West", aliases=["w"],
- location=meadow6, destination=meadow5)
- meadow6_ex4 = create_object(exits.Exit, key="North West", aliases=["nw"],
- location=meadow6, destination=meadow7)
- # NPCS/OBJECTS
- """
- K - Meadow Room #7
- L - K
- | X | \
- H - I - J
- """
- # ROOM DETAILS
- meadow7.db.desc = """\
- A carpet of grass spreads out before you. To the east you see buildings
- in the distance, and to the south, a large tree rises from the grassy
- meadow. To the west looms a dark, dense grove of trees that looks like
- it would be difficult to travel through.
- """
- meadow7.db.terrain = "EASY"
- meadow7.tags.add("riverport", category="zone")
- # EXITS
- meadow7_ex1 = create_object(exits.Exit, key="South East", aliases=["se"],
- location=meadow7, destination=meadow6)
- meadow7_ex2 = create_object(exits.Exit, key="South", aliases=["s"],
- location=meadow7, destination=meadow5)
- meadow7_ex3 = create_object(exits.Exit, key="South West", aliases=["sw"],
- location=meadow7, destination=meadow4)
- meadow7_ex4 = create_object(exits.Exit, key="West", aliases=["w"],
- location=meadow7, destination=meadow8)
- # NPCS/OBJECTS
- """
- L - Meadow Room #8
- M - L - K
- \ | X |
- H - I
- """
- # ROOM DETAILS
- meadow8.db.desc = """\
- As you squeeze between the densely-packed vegetation, you notice that most of
- the sunlight is blocked by the thick canopy of trees in this grove. You hear
- the sound of something moving in the underbrush and prepare for the worst...
- """
- meadow8.db.terrain = "VEGETATION"
- meadow8.db.capacity = 7
- meadow8.tags.add("riverport", category="zone")
- # EXITS
- meadow8_ex1 = create_object(exits.Exit, key="East", aliases=["e"],
- location=meadow8, destination=meadow7)
- meadow8_ex2 = create_object(exits.Exit, key="South East", aliases=["se"],
- location=meadow8, destination=meadow5)
- meadow8_ex3 = create_object(exits.Exit, key="South", aliases=["s"],
- location=meadow8, destination=meadow4)
- meadow8_ex4 = create_object(exits.Exit, key="West", aliases=["w"],
- location=meadow8, destination=meadow9)
- # NPCS/OBJECTS
- """
- M - Meadow Room #9
- M - L
- \ |
- H
- """
- # ROOM DETAILS
- meadow9.db.desc = """\
- Bordered to the west by the murmuring waters of the |gRiver Kai|n, this sun
- drenched meadow is carpeted with short grass. Along the river bank, tall
- reeds rise higher, and beyond them, you see a small island, dotted with trees,
- standing in the middle of the rushing waters.
- """
- meadow9.db.terrain = "EASY"
- meadow9.tags.add("riverport", category="zone")
- # EXITS
- meadow9_ex1 = create_object(exits.Exit, key="East", aliases=["e"],
- location=meadow9, destination=meadow8)
- meadow9_ex2 = create_object(exits.Exit, key="South East", aliases=["se"],
- location=meadow9, destination=meadow4)
- # NPCS/OBJECTS
- """
- N - Shrine Path
- B
- |
- N
- \
- O
- """
- # ROOM DETAILS
- shrine1.db.desc = """\
- A dirt |wpath|n leads through a grassy feald.
- To the west, reeds rise along the shores of the |gKai|n. To the southeast, a
- grove of trees that look as though they were positioned intentionally shrouds
- a small, ancient building in the distance.
- """
- shrine1.db.terrain = "EASY"
- shrine1.tags.add("riverport", category="zone")
- shrine1.db.details["path"] = """\
- The path is simply a stretch of meadow grass worn thin, tamped down by the feet
- of pilgrims and mourners for the fallen on the way to the |gShrine of Grass|n.
- """
- # EXITS
- shrine1_ex1 = create_object(exits.Exit, key="North", aliases=["n"],
- location=shrine1, destination=road1)
- shrine1_ex2 = create_object(exits.Exit, key="South East", aliases=["se"],
- location=shrine1, destination=shrine2)
- # NPCS/OBJECTS
- """
- O - Shrine Entrance
- N
- \
- O
- """
- # ROOM DETAILS
- shrine2.db.desc = """\
- You enter a circle of trees and come upon a small stone structure. You
- can see a large, open |warchway|n on one side of the shrine. There is
- no caretaker to be seen, but the area is well-kept, and you can see wisps
- of smoke rising to the sky above the clearing.
- """
- shrine2.db.terrain = "EASY"
- shrine2.tags.add("riverport", category="zone")
- shrine2.tags.add("no_attack", category="flags")
- # EXITS
- shrine2_ex1 = create_object(exits.Exit, key="North East", aliases=["ne"],
- location=shrine2, destination=shrine1)
- shrine2_ex2 = create_object(exits.Exit, key="Archway",
- aliases=["arch", "shrine", "door"],
- location=shrine2, destination=shrine3)
- # NPCS/OBJECTS
- """
- O - Shrine of Grass
- O
- """
- # ROOM DETAILS
- shrine3.db.desc = """\
- The smooth stones of the shrine's floor and walls surround you, and you feel
- energy surging within them. You see trees looming before an open sky through
- the tall, open |warchway|n at the front of the shrine. A fire burning at the
- center of what appears to be a shallow pool of shimmering purple liquid is
- opposite the archway.
- """
- shrine3.db.terrain = "EASY"
- shrine3.tags.add("riverport", category="zone")
- shrine3.tags.add("no_attack", category="flags")
- # EXITS
- shrine3 = create_object(exits.Exit, key="Archway",
- aliases=["door", "arch", "out"],
- location=shrine3, destination=shrine2)
- # NPCS/OBJECTS
Add Comment
Please, Sign In to add comment