Resource icon

Advanced Camping & Outpost System 2020-06-16

No permission to download

Massapequa

Citizen
Apr 28, 2020
10
9
3
New York
Massapequa submitted a new resource:

Advanced Camping & Outpost System - Making the camping skill more fun to use

Camping has always been an under utilized skill in UO and I wanted to make it a little more useful and fun to use. To do this, I've added items and perks to building campfires as well as introduced Outposts that can be placed around the world for skilled campers to find and upgrade for the benefit of themselves and other players.

1) Camper's map: These are items that will allow campers to Mark the location of Outposts and campsites, to be returned to later.

2) Upgraded campfire: At 70...
Read more about this resource...
 

Espcevan

Gold Donator
Apr 21, 2015
68
27
18
31
www.UOAccess.com
Shard Name
UOAccess
Was there an edit to kindling that needed done to bring up the outpost?
Im a little lost on how this is supposed to get "started"

When I threw this into my server i had to fix a couple errors...
C#:
ServUO - [https://www.servuo.com] Version 0.5, Build 7478.41612
 + _Custom/Systems/Advanced Camping/Campfire.cs:
    CS1002: Line 47: ; expected
    CS1519: Line 47: Invalid token ';' in class, struct, or interface member declaration
    CS1002: Line 250: ; expected
    CS1519: Line 250: Invalid token ';' in class, struct, or interface member declaration
    CS1002: Line 251: ; expected
    CS1519: Line 251: Invalid token ';' in class, struct, or interface member declaration
    CS1002: Line 252: ; expected
    CS1519: Line 252: Invalid token ';' in class, struct, or interface member declaration
    CS1002: Line 253: ; expected
    CS1519: Line 253: Invalid token '&&' in class, struct, or interface member declaration
    CS1519: Line 253: Invalid token '!=' in class, struct, or interface member declaration
    CS1519: Line 253: Invalid token '&&' in class, struct, or interface member declaration
    CS1519: Line 253: Invalid token '==' in class, struct, or interface member declaration
    CS1519: Line 253: Invalid token '&&' in class, struct, or interface member declaration
    CS1519: Line 253: Invalid token '(' in class, struct, or interface member declaration
    CS1519: Line 253: Invalid token ',' in class, struct, or interface member declaration
    CS1519: Line 253: Invalid token ')' in class, struct, or interface member declaration
 + _Custom/Systems/Advanced Camping/OutpostBedroll.cs:
    CS1002: Line 38: ; expected
    CS1519: Line 38: Invalid token ';' in class, struct, or interface member declaration
    CS1002: Line 153: ; expected
    CS1519: Line 153: Invalid token ';' in class, struct, or interface member declaration
    CS1002: Line 154: ; expected
    CS1519: Line 154: Invalid token ';' in class, struct, or interface member declaration
    CS1002: Line 155: ; expected
    CS1519: Line 155: Invalid token ';' in class, struct, or interface member declaration
    CS1002: Line 156: ; expected
    CS1519: Line 156: Invalid token '&&' in class, struct, or interface member declaration
    CS1519: Line 156: Invalid token '==' in class, struct, or interface member declaration
    CS1519: Line 156: Invalid token '&&' in class, struct, or interface member declaration
    CS1519: Line 156: Invalid token '(' in class, struct, or interface member declaration
    CS1519: Line 156: Invalid token ',' in class, struct, or interface member declaration
    CS1519: Line 156: Invalid token ')' in class, struct, or interface member declaration
 + _Custom/Systems/Advanced Camping/OutpostCamp.cs:
    CS1002: Line 31: ; expected
    CS1519: Line 31: Invalid token '(' in class, struct, or interface member declaration
 + _Custom/Systems/Advanced Camping/SmallTent.cs:
    CS1002: Line 5: ; expected

I got all of the errors fixed, not sure what version of ServUO this is supposed to be for but mine threw these errors because of the lines with
C#:
        public PlayerMobile Player => m_Player;
i fixed by changing them to this format below
C#:
        public PlayerMobile Player
        {
            get
            {
                return this.m_Player;
            }
        }
the one problem i did have with this was with the Valid
C#:
        public bool Valid => !Fire.Deleted && Fire.Status != CampfireStatus.Off && Player.Map == Fire.Map && Player.InRange(Fire, Campfire.SecureRange);
i fixed it by doing this in campfire.cs....
C#:
        private bool m_Valid;

        public CampfireEntry(PlayerMobile player, Campfire fire)
        {
            m_Player = player;
            m_Fire = fire;
            m_Start = DateTime.UtcNow;
            m_Safe = false;

            if (!Fire.Deleted && Fire.Status != CampfireStatus.Off && Player.Map == Fire.Map && Player.InRange(Fire, Campfire.SecureRange))
                m_Valid = true;
            else
                m_Valid = false;

        }

        public bool Valid //=> !Fire.Deleted && Fire.Status != CampfireStatus.Off && Player.Map == Fire.Map && Player.InRange(Fire, Campfire.SecureRange);
        {
            get
            {
                return this.m_Valid;
            }
        }
i really dont think its working the way it should.... not sure how your code format works so im at a loss
This format stumps me and my ServUO.Exe Compile:
        public PlayerMobile Player => m_Player;
 
Last edited:

Massapequa

Citizen
Apr 28, 2020
10
9
3
New York
Was there an edit to kindling that needed done to bring up the outpost?
Im a little lost on how this is supposed to get "started"
Actually no item is required to start an outpost.
You just gotta add the "OutpostCamp" item in the game and players with enough Camping skill can double click on the fire pit to start it up. :)
 

Massapequa

Citizen
Apr 28, 2020
10
9
3
New York
Was there an edit to kindling that needed done to bring up the outpost?
Im a little lost on how this is supposed to get "started"

When I threw this into my server i had to fix a couple errors...
C#:
ServUO - [https://www.servuo.com] Version 0.5, Build 7478.41612
+ _Custom/Systems/Advanced Camping/Campfire.cs:
    CS1002: Line 47: ; expected
    CS1519: Line 47: Invalid token ';' in class, struct, or interface member declaration
    CS1002: Line 250: ; expected
    CS1519: Line 250: Invalid token ';' in class, struct, or interface member declaration
    CS1002: Line 251: ; expected
    CS1519: Line 251: Invalid token ';' in class, struct, or interface member declaration
    CS1002: Line 252: ; expected
    CS1519: Line 252: Invalid token ';' in class, struct, or interface member declaration
    CS1002: Line 253: ; expected
    CS1519: Line 253: Invalid token '&&' in class, struct, or interface member declaration
    CS1519: Line 253: Invalid token '!=' in class, struct, or interface member declaration
    CS1519: Line 253: Invalid token '&&' in class, struct, or interface member declaration
    CS1519: Line 253: Invalid token '==' in class, struct, or interface member declaration
    CS1519: Line 253: Invalid token '&&' in class, struct, or interface member declaration
    CS1519: Line 253: Invalid token '(' in class, struct, or interface member declaration
    CS1519: Line 253: Invalid token ',' in class, struct, or interface member declaration
    CS1519: Line 253: Invalid token ')' in class, struct, or interface member declaration
+ _Custom/Systems/Advanced Camping/OutpostBedroll.cs:
    CS1002: Line 38: ; expected
    CS1519: Line 38: Invalid token ';' in class, struct, or interface member declaration
    CS1002: Line 153: ; expected
    CS1519: Line 153: Invalid token ';' in class, struct, or interface member declaration
    CS1002: Line 154: ; expected
    CS1519: Line 154: Invalid token ';' in class, struct, or interface member declaration
    CS1002: Line 155: ; expected
    CS1519: Line 155: Invalid token ';' in class, struct, or interface member declaration
    CS1002: Line 156: ; expected
    CS1519: Line 156: Invalid token '&&' in class, struct, or interface member declaration
    CS1519: Line 156: Invalid token '==' in class, struct, or interface member declaration
    CS1519: Line 156: Invalid token '&&' in class, struct, or interface member declaration
    CS1519: Line 156: Invalid token '(' in class, struct, or interface member declaration
    CS1519: Line 156: Invalid token ',' in class, struct, or interface member declaration
    CS1519: Line 156: Invalid token ')' in class, struct, or interface member declaration
+ _Custom/Systems/Advanced Camping/OutpostCamp.cs:
    CS1002: Line 31: ; expected
    CS1519: Line 31: Invalid token '(' in class, struct, or interface member declaration
+ _Custom/Systems/Advanced Camping/SmallTent.cs:
    CS1002: Line 5: ; expected

I got all of the errors fixed, not sure what version of ServUO this is supposed to be for but mine threw these errors because of the lines with
C#:
        public PlayerMobile Player => m_Player;
i fixed by changing them to this format below
C#:
        public PlayerMobile Player
        {
            get
            {
                return this.m_Player;
            }
        }
the one problem i did have with this was with the Valid
C#:
        public bool Valid => !Fire.Deleted && Fire.Status != CampfireStatus.Off && Player.Map == Fire.Map && Player.InRange(Fire, Campfire.SecureRange);
i fixed it by doing this in campfire.cs....
C#:
        private bool m_Valid;

        public CampfireEntry(PlayerMobile player, Campfire fire)
        {
            m_Player = player;
            m_Fire = fire;
            m_Start = DateTime.UtcNow;
            m_Safe = false;

            if (!Fire.Deleted && Fire.Status != CampfireStatus.Off && Player.Map == Fire.Map && Player.InRange(Fire, Campfire.SecureRange))
                m_Valid = true;
            else
                m_Valid = false;

        }

        public bool Valid //=> !Fire.Deleted && Fire.Status != CampfireStatus.Off && Player.Map == Fire.Map && Player.InRange(Fire, Campfire.SecureRange);
        {
            get
            {
                return this.m_Valid;
            }
        }
i really dont think its working the way it should.... not sure how your code format works so im at a loss
This format stumps me and my ServUO.Exe Compile:
        public PlayerMobile Player => m_Player;

Wow, yeah, this is a lot to work with. I'm gonna try to work out what's going on here. It's weird because your code shows:
ServUO - [https://www.servuo.com] Version 0.5, Build 7478.41612
and I'm running the same version. It's odd that so many errors popped up off the bat.

As for the example you gave:
public PlayerMobile Player => m_Player;

This is just how I pass the private value 'm_Player' into the public variable Player.

That expression '=>' wasn't something I had actually encountered until I downloaded my version of ServUO.

Did you get it all to compile, or are just getting hit with more errors?
 

Espcevan

Gold Donator
Apr 21, 2015
68
27
18
31
www.UOAccess.com
Shard Name
UOAccess
I got it all to compile, but I don't think what i did with the m_Valid is right.

When I add the OutpostCamp it puts down an unused tile I can't delete and then the fire pops up.
 

Massapequa

Citizen
Apr 28, 2020
10
9
3
New York
So, The unused tile is supposed to be there actually. I know it's counter intuitive, but it's not visible to players and is just supposed to be the base from which the other stuff spawns... However, you should be able to delete the unused tile. The point in the invisible unused tile "is" the camp, and the other items are created around it. deleting the unused tile should delete the whole camp.
Now that I type it out, it sounds strange and I probably should have clarified the functionality in the main post.
Post automatically merged:

Hope that cleared things up with the unused tile lol.
As far as your changes to Valid, it looks good to me. It's just supposed to be true if the campfire is not deleted, not extinguished and the player is in range, which is exactly what you did.
 
Last edited:

Espcevan

Gold Donator
Apr 21, 2015
68
27
18
31
www.UOAccess.com
Shard Name
UOAccess
So, The unused tile is supposed to be there actually. I know it's counter intuitive, but it's not visible to players and is just supposed to be the base from which the other stuff spawns... However, you should be able to delete the unused tile. The point in the invisible unused tile "is" the camp, and the other items are created around it. deleting the unused tile should delete the whole camp.
Now that I type it out, it sounds strange and I probably should have clarified the functionality in the main post.
Post automatically merged:

Hope that cleared things up with the unused tile lol.
As far as your changes to Valid, it looks good to me. It's just supposed to be true if the campfire is not deleted, not extinguished and the player is in range, which is exactly what you did.
Yes it did make sense why, but I still cant delete the unused tile. doesnt allow me to delete it and if I [props it, it only shows the ground tile.

Would it be possible to do something like the XML spawner and have the camp be a hidden item that spawns the stuff?

Also:
I downloaded the latest ServUO Git and this compiles fine from the start with no edits needed. For some reason my version of the Server files doesnt allow it to recognize that format of code​
Post automatically merged:

[area remove where basemulti
was able to remove it
Post automatically merged:

Also ALSO...
IF you put it on an XMLSpawner that works too
 
Last edited:

Massapequa

Citizen
Apr 28, 2020
10
9
3
New York
Yes it did make sense why, but I still cant delete the unused tile. doesnt allow me to delete it and if I [props it, it only shows the ground tile.

Would it be possible to do something like the XML spawner and have the camp be a hidden item that spawns the stuff?

Also:
I downloaded the latest ServUO Git and this compiles fine from the start with no edits needed. For some reason my version of the Server files doesnt allow it to recognize that format of code​
Post automatically merged:

[area remove where basemulti
was able to remove it
Post automatically merged:

Also ALSO...
IF you put it on an XMLSpawner that works too

That's really strange that it won't let you target the tile...
But yeah, putting on a spawner is a definitely good option. That way you can just delete it all from there.

Sorry about the delayed response and I'm stoked you were able to get that all figured out.
Is everything working okay now?
 

PyrO

Paladin
Jan 27, 2015
1,285
147
63
Your changes to Valid are ... not valid :D

all you would have to do is

C#:
public bool Valid
{
    get
    {
        return !Fire.Deleted && Fire.Status != CampfireStatus.Off && Player.Map == Fire.Map && Player.InRange(Fire, Campfire.SecureRange);
    }
}
And well it doesnt really matter what ServUO version it is since that comes from a higher / newer C# Version

---

To clarify why it is not valid what you did:

You defined a variable in CampfireEntry and then only set it on creation (in the Constructor)
therefor the value wasnt reflecting the actual state.
 
  • Like
Reactions: Massapequa

Espcevan

Gold Donator
Apr 21, 2015
68
27
18
31
www.UOAccess.com
Shard Name
UOAccess
That's really strange that it won't let you target the tile...
But yeah, putting on a spawner is a definitely good option. That way you can just delete it all from there.

Sorry about the delayed response and I'm stoked you were able to get that all figured out.
Is everything working okay now?
Yeah everything's okay now and working.

Your changes to Valid are ... not valid :D

all you would have to do is

C#:
public bool Valid
{
    get
    {
        return !Fire.Deleted && Fire.Status != CampfireStatus.Off && Player.Map == Fire.Map && Player.InRange(Fire, Campfire.SecureRange);
    }
}
And well it doesnt really matter what ServUO version it is since that comes from a higher / newer C# Version

---

To clarify why it is not valid what you did:

You defined a variable in CampfireEntry and then only set it on creation (in the Constructor)
therefor the value wasnt reflecting the actual state.
Thank you, that works :D