Questions About Building

已查看 98 次
跳至第一个未读帖子

CivilS4m

未读,
2021年2月20日 22:45:372021/2/20
收件人 Evennia
Hello,
  So I am now learning the ropes for building and have a few questions that I cannot find in the very extensive helpfiles / tutorials.

First one is,
  How do I wrap text so it isn't one long string for my room description?
I am currently typing it out as one line with describe (rooom name) = (what I want to say) but I'd like to compact it more instead of having it go as one long line for its description.

Also, I have been reading up on how to make a overhead map as that is something I'd like to tackle someday soon. I noticed in this tutorial,
it states, " Rooms must be connected and linked together for the map to be generated correctly. Vanilla Evennia comes with a admin command @tunnel that allows a user to create rooms in the cardinal directions, but additional work is needed to assure that rooms are connected."
So don't use the tunnel command when linking rooms? I noticed Dig and Link are other commands for connecting rooms, should I be using those instead? What would be the best practice for linking rooms if I want to add a map in the future?

That's it for now and I love what I am learning here! Thank you so much.

Zude Onim

未读,
2021年2月21日 01:46:132021/2/21
收件人 eve...@googlegroups.com
A string containing \n will create a new line, while you can use
colour codes, too,
which are |n |r, etc.
See all colour codes by inputting "xterm256" into client

character.msg("\n|nYou slash at the |Y%s|n.\n|nThe |Y%s |ndoes not
enjoy it." % (target, target))

will return :

You slash at the orc.
The orc does not like it.

The |n in the string makes a nice-"normal"-grey colour.
The |Y is a dark yellow.

Regarding digging :
Enter commands like this :

dig kitchen:typeclasses.rooms.Kitchen = north;n,south;s
(notice the semi-colons to create aliases, and the commas to create
the return exit)

Then open other exits to the room if need be, like this :

open northwest;nw,southeast;se = kitchen
open northwest;nw,southeast;se = #345
(better to use the #dbref instead of room name here)
(notice the semi-colons to create aliases, and the commas to create
the return exit)

Does that make sense ?

On 2/21/21, CivilS4m <jai...@gmail.com> wrote:
> Hello,
> So I am now learning the ropes for building and have a few questions that
>
> I cannot find in the very extensive helpfiles / tutorials.
>
> First one is,
> How do I wrap text so it isn't one long string for my room description?
> I am currently typing it out as one line with describe (rooom name) = (what
>
> I want to say) but I'd like to compact it more instead of having it go as
> one long line for its description.
>
> Also, I have been reading up on how to make a overhead map as that is
> something I'd like to tackle someday soon. I noticed in this tutorial,
> https://www.evennia.com/docs/latest/Dynamic-In-Game-Map.html?highlight=map
> it states, " Rooms must be connected and linked together for the map to be
> generated correctly. Vanilla Evennia comes with a admin command @tunnel
> <https://www.evennia.com/docs/latest/Default-Command-Help.html#tunnel-cmdtunnel>
>
> that allows a user to create rooms in the cardinal directions, but
> additional work is needed to assure that rooms are connected."
> So don't use the tunnel command when linking rooms? I noticed Dig and Link
> are other commands for connecting rooms, should I be using those instead?
> What would be the best practice for linking rooms if I want to add a map in
>
> the future?
>
> That's it for now and I love what I am learning here! Thank you so much.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Evennia" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to evennia+u...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/evennia/3f174ada-b27c-456b-9c4a-426695d0ccd2n%40googlegroups.com.
>

CivilS4m

未读,
2021年2月21日 10:15:322021/2/21
收件人 Evennia
Yes, that makes perfect sense and was super helpful. Thank you so much!

CivilS4m

未读,
2021年2月21日 11:34:422021/2/21
收件人 Evennia
Also, xterm256 seems to do nothing for me when I type it in my client.
xterm256
Command 'xterm256' is not available. Type "help" for help.
and I am a superuser,

On Sunday, February 21, 2021 at 1:46:13 AM UTC-5 zude...@gmail.com wrote:

Griatch Art

未读,
2021年2月21日 11:40:412021/2/21
收件人 Evennia
Are you puppeting a character?

CivilS4m

未读,
2021年2月21日 11:43:502021/2/21
收件人 Evennia
It says I am putting myself. I looked in the glossary for puppet just now and it just says I am playing an "object". I take it I have to leave this? If so, how do I do that?

CivilS4m

未读,
2021年2月21日 11:47:282021/2/21
收件人 Evennia

describe The In-Between = Test. \n Test for another line.
The description was set on The In-Between(#2).
l
The In-Between(#2)
Test. \n Test for another line.

I can't seem to get \n to work for going to another line either.

describe The In-Between = Test. \n Test for another line.
The description was set on The In-Between(#2).
l
The In-Between(#2)
Test. \n Test for another line.

On Sunday, February 21, 2021 at 11:40:41 AM UTC-5 gri...@gmail.com wrote:

CivilS4m

未读,
2021年2月21日 11:53:352021/2/21
收件人 Evennia
I found it! |/ is the command for line break. I take it \n is for when you are directly in python? You can build from within your python server?

On Sunday, February 21, 2021 at 11:40:41 AM UTC-5 gri...@gmail.com wrote:

CivilS4m

未读,
2021年2月21日 21:07:392021/2/21
收件人 Evennia
I tried entering that command for dig just because I couldn't get it to work by typing it out the way I wanted for a room and I got these errors in both just the client as a build and using PY in front of it. Any suggestions to the error?


dig kitchen:typeclasses.rooms.Kitchen = north;n,south;s
Traceback (most recent call last):
  File "/home/pi/muddev/evennia/evennia/commands/cmdhandler.py", line 644, in _run_command
    ret = cmd.func()
  File "/home/pi/muddev/evennia/evennia/commands/default/building.py", line 899, in func
    typeclass, room["name"], aliases=room["aliases"], report_to=caller
  File "/home/pi/muddev/evennia/evennia/utils/create.py", line 126, in create_object
    typeclass = class_from_module(typeclass, settings.TYPECLASS_PATHS)
  File "/home/pi/muddev/evennia/evennia/utils/utils.py", line 1478, in class_from_module
    raise ImportError(err)
ImportError:
Could not load typeclass 'typeclasses.rooms.Kitchen'
Paths searched:
    typeclasses.rooms.Kitchen
    typeclasses.typeclasses.rooms.Kitchen
    evennia.typeclasses.rooms.Kitchen
    evennia.contrib.typeclasses.rooms.Kitchen
    evennia.contrib.tutorial_examples.typeclasses.rooms.Kitchen

An untrapped error occurred.
(Traceback was logged 21-02-22 02:05:18).
py dig kitchen:typeclasses.rooms.Kitchen = north;n,south;s
>>> dig kitchen:typeclasses.rooms.Kitchen = north;n,south;s
    dig kitchen:typeclasses.rooms.Kitchen = north;n,south;s
              ^
SyntaxError: invalid syntax
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "/home/pi/muddev/evennia/evennia/commands/default/system.py", line 213, in _run_code_snippet
    pycode_compiled = compile(pycode, "", mode)
  File "<string>", line 1

    dig kitchen:typeclasses.rooms.Kitchen = north;n,south;s
              ^
SyntaxError: invalid syntax


@py dig kitchen:typeclasses.rooms.Kitchen = north;n,south;s
>>> dig kitchen:typeclasses.rooms.Kitchen = north;n,south;s
    dig kitchen:typeclasses.rooms.Kitchen = north;n,south;s
              ^
SyntaxError: invalid syntax
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "/home/pi/muddev/evennia/evennia/commands/default/system.py", line 213, in _run_code_snippet
    pycode_compiled = compile(pycode, "", mode)
  File "<string>", line 1

    dig kitchen:typeclasses.rooms.Kitchen = north;n,south;s
              ^
SyntaxError: invalid syntax

On Sunday, February 21, 2021 at 1:46:13 AM UTC-5 zude...@gmail.com wrote:

CivilS4m

未读,
2021年2月21日 21:19:382021/2/21
收件人 Evennia

Of course as soon as I posted the SyntaxErrors I think I solved it. So would this be the proper way to dig and connect rooms for a future overhead map?
dig Loop De Loop = north;n, south;s, dig The In-Between
Created room Loop De Loop(#85) of type typeclasses.rooms.Room.
Created Exit from The In-Between to Loop De Loop: north(#86) (n).
Created Exit back from Loop De Loop to The In-Between: south(#87) (s).

Also, is there a way to add descriptions to a room with this command in one go or do I have to go in and add the description after?

Zude Onim

未读,
2021年2月22日 00:01:362021/2/22
收件人 eve...@googlegroups.com
dig/tel Loop De Loop:typeclasses.rooms.LoopyRoom = north;n,south;s
set here/desc = "The Loop De Loop room is blah blah ..."

The "/tel" switch teleports you to the newly created room, once the
room and exits are created.

You don't need the space between the comma and "south",
to avoid your exit being named " south" (see the space?)

Remember to include ":typeclasses.rooms.LoopyRoom"
and to have a room class "LoopyRoom" in your typeclasses.rooms file.

Enter both those commands at one time,
and you'll :
- create the room, named "Loop De Loop" of typeclass
"typeclasses.rooms.LoopyRoom"
- create an exit to the room, named north, with alias n
- create an exit back to your current location, named south, with alias s
- set description on your current location (the new room, because you
teleported to it with the /tel switch)

On 2/22/21, CivilS4m <jai...@gmail.com> wrote:
>
> Of course as soon as I posted the SyntaxErrors I think I solved it. So
> would this be the proper way to dig and connect rooms for a future overhead
>
> map?
> dig Loop De Loop = north;n, south;s, dig The In-Between
> Created room Loop De Loop(#85) of type typeclasses.rooms.Room.
> Created Exit from The In-Between to Loop De Loop: north(#86) (n).
> Created Exit back from Loop De Loop to The In-Between: south(#87) (s).
>
> Also, is there a way to add descriptions to a room with this command in one
>
> go or do I have to go in and add the description after?
> On Sunday, February 21, 2021 at 9:07:39 PM UTC-5 CivilS4m wrote:
>
>> I tried entering that command for dig just because I couldn't get it to
>> work by typing it out the way I wanted for a room and I got these errors
>> in
>> both just the client as a build and using PY in front of it. Any
>> suggestions to the error?
>>
>> *dig kitchen:typeclasses.rooms.Kitchen = north;n,south;s *
>> Traceback (most recent call last):
>> File "/home/pi/muddev/evennia/evennia/commands/cmdhandler.py", line 644,
>>
>> in _run_command
>> ret = cmd.func()
>> File "/home/pi/muddev/evennia/evennia/commands/default/building.py",
>> line 899, in func
>> typeclass, room["name"], aliases=room["aliases"], report_to=caller
>> File "/home/pi/muddev/evennia/evennia/utils/create.py", line 126, in
>> create_object
>> typeclass = class_from_module(typeclass, settings.TYPECLASS_PATHS)
>> File "/home/pi/muddev/evennia/evennia/utils/utils.py", line 1478, in
>> class_from_module
>> raise ImportError(err)
>> ImportError:
>> Could not load typeclass 'typeclasses.rooms.Kitchen'
>> Paths searched:
>> typeclasses.rooms.Kitchen
>> typeclasses.typeclasses.rooms.Kitchen
>> evennia.typeclasses.rooms.Kitchen
>> evennia.contrib.typeclasses.rooms.Kitchen
>> evennia.contrib.tutorial_examples.typeclasses.rooms.Kitchen
>>
>> An untrapped error occurred.
>> (Traceback was logged 21-02-22 02:05:18).
>> *py dig kitchen:typeclasses.rooms.Kitchen = north;n,south;s *
>> >>> dig kitchen:typeclasses.rooms.Kitchen = north;n,south;s
>> dig kitchen:typeclasses.rooms.Kitchen = north;n,south;s
>> ^
>> SyntaxError: invalid syntax
>> During handling of the above exception, another exception occurred:
>> Traceback (most recent call last):
>> File "/home/pi/muddev/evennia/evennia/commands/default/system.py", line
>>
>> 213, in _run_code_snippet
>> pycode_compiled = compile(pycode, "", mode)
>> File "<string>", line 1
>> dig kitchen:typeclasses.rooms.Kitchen = north;n,south;s
>> ^
>> SyntaxError: invalid syntax
>>
>>
>> *@py dig kitchen:typeclasses.rooms.Kitchen = north;n,south;s *
> https://groups.google.com/d/msgid/evennia/8d774659-69bb-4139-9e28-3d8ac773fbaen%40googlegroups.com.
>

CivilS4m

未读,
2021年2月22日 14:05:412021/2/22
收件人 Evennia
Hi, so is this method you described for building similar rooms within one zone in a mud? I ask because you mentioned remembering to have a room class which if building one individual room seems like more work then just doing,

dig Loop De Loop = north;n, south;s, dig The In-Between 

set here/desc = "The Loop De Loop room is blah blah ..."

So then I though, maybe your explination is a much faster way to do an entire zone? Lets call it, jungle, and then having that room class referenced each time means all the rooms are in that specific room class and thus would make it much more organized? If this is correct for my guess, how does one make a room class within the typeclasses.rooms file from within the mud?

Zude Onim

未读,
2021年2月22日 22:19:252021/2/22
收件人 eve...@googlegroups.com
You don't create a room class from "within the MUD",
you edit your typeclasses.rooms file.

Here is a sample of my rooms.py file, in directory :
C:\games\MUD\dev4\ff_system_game\typeclasses

class Room(DefaultRoom):

def at_object_creation(self):
self.db.desc = "|x..."
self.db.has_map = True
self.db.map = "|x..."

etc etc

(those specific attributes above are specific for my MUD. You will use
different attributes, but including self.db.desc is maybe a good
idea.)

You could have another below it :

class Room_Mountains(DefaultRoom):

def at_object_creation(self):
self.db.desc = "|xMountains"
self.db.has_map = True
self.db.map = "|x..."

etc etc

and more, etc, for each type of room.

When you "dig", change the typeclass, like so :

dig/tel Loopy Mountains:typeclasses.rooms.Room_Mountains = north;n,south;s

... and it will be of the "Room_Mountains" typeclass.

QUESTION :

Why are including "dig The In-Between"
in this line ??? :

dig Loop De Loop = north;n, south;s, dig The In-Between

Just do this :

dig/tel Loop De Loop:typeclasses.rooms.LoopyRoom = north;n,south;s

after creating a few different room classes in your rooms.py file,
and specify which class you are creating when you input the above command.

Understand ?
(if not, ask questions. that's what we're here for)

Follow my instructions.
They are good.
They work.
>> https://groups.google.com/d/msgid/evennia/8d774659-69bb-4139-9e28-3d8ac773fbaen%40googlegroups.com
>> .
>> >
>>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Evennia" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to evennia+u...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/evennia/525e510d-72ea-47c1-ad47-e23bf6d8f2ccn%40googlegroups.com.
>

CivilS4m

未读,
2021年2月23日 17:17:562021/2/23
收件人 Evennia
Thank you for the explanation. I will give this a try when I get some free time!

Griatch Art

未读,
2021年2月24日 03:02:292021/2/24
收件人 Evennia
As for zones, Evennia recommends tagging to handle those. See here: https://www.evennia.com/docs/latest/Zones.html
.
Griatch
回复全部
回复作者
转发
0 个新帖子