Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DONE] Commune I #12347

Merged
merged 63 commits into from May 24, 2015

Conversation

Projects
None yet
9 participants
@acidia
Copy link
Contributor

commented May 11, 2015

You can see old pictures in the forum post: http://smf.cataclysmdda.com/index.php?topic=9968.30

Due to the reformatting of all the mission and npc dialogue structures I had to cut the agricultural supervisor missions till later. I also pulled the special companion missions menu (trade run, patrol, scavenge, plant/harvest crops) till I can actually get it working without using z-10 to store people.

To find it, just follow the merchant missions in the refugee center... the third mission is now to retrieve a prospectus from the outpost (before this, the ranch is empty).

I also fixed the bug that prevented NPCs from receiving their misc. items... so NPCs and shopkeepers will be loaded with items once again.

Known issues to be fixed in later additions...
-The map updating can be very slow between missions... the search range didn't seem to work so it is currently searching the entire map for a tile that is 3 blocks away
-The nurse will currently perform first aid on smashed limbs on you and your companions (will be moved to doctor)
-The commune name isn't randomized
-The doctor is more of a place holder till his talk options are added.

void talk_function::buy_beer(npc *p)
{
item cont = item("bottle_glass", 0, false);
item liq = item("beer", 0);

This comment has been minimized.

Copy link
@BevapDin

BevapDin May 11, 2015

Contributor

You could use liq = liq.in_its_container(); here to put the liquid into its default container. liq will become a bottle with beer or so. The container item is taken from the item data of the liquid and it's automatically filled to the brim (the charges of the liquid are adjusted to match the container size).

This allows you to completely remove the cont item, the charge setting and the call to handle_liquid (which creates the message you complained about).

This comment has been minimized.

Copy link
@acidia

acidia May 11, 2015

Author Contributor

Hmmm... that doesn't really solve the problem for most of the drinks though. Without glasses, giving you a single shot in a glass bottle is about the best approximation I can think of. I had already traced out the message but I wasn't sure how I wanted to handle it so I just left it for now.

This comment has been minimized.

Copy link
@BevapDin

BevapDin May 11, 2015

Contributor

I'm not sure what you need more (approximation of what?). If you need to set the charges of the liquid, just do it after it has been put into the container (or put it there manually):

item cont( "bottle", 0 );
cont.put_in( liq( "beer", 0 ) );
cont.content[0].charges = 10;
g->u.i_add( cont );

// Or set the charges before:
item liq( "beer", 0 );
item cont( "bottle", 0 );
liq.charges = 10;
cont.put_in( beer );
g->u.i_add( cont );

// You can use the contents vector direcly instead of put_in:
item cont( "bottle", 0 );
cont.contents.push_back( liq( "beer", 0 ) );
cont.content[0].charges = 10;
g->u.i_add( cont );

Anything to avoid handle_liquid. That function is used to allow the player to choose the target container. Putting things into a container is not its purpose. You can put things direcly into the item using the item class.


If you want to avoid giving the player a free bottle, just call move_liquid and check the remaining charges (used that way in player::siphon, for example):

item liq( "beer", 0 );
const long default_charges = 10
liq.charges = default_charges;
const int remain = g->move_liquid( liq );
if( remain <= -1 ) {
    // canceled, nothing has been used.
    return;
}
const long used_charges = default_charges - remain;
// Note: used_charges may be 0, but that's fine here.
g->u.cash -= used_charges * price;

You can check for enough container space with player::has_container_for (the crafting code does this).

This comment has been minimized.

Copy link
@acidia

acidia May 12, 2015

Author Contributor

Looks like put_in is all I actually needed. I tried in_its_container but that defaults to cans instead of bottles.

@Zireael07

This comment has been minimized.

Copy link
Contributor

commented May 12, 2015

Woo!

site = target_om_ter_random("ranch_camp_56", 1, miss, false);
bay.load(site.x * 2, site.y * 2, site.z, false);
bay.translate(t_underbrush, t_dirt);
bay.add_vehicle("hippie_van", 13, 20, 270);

This comment has been minimized.

Copy link
@kevingranade

kevingranade May 18, 2015

Member

calls to add_vehicle that supply a literal string need to look like this now:

bay.add_vehicle( vproto_id("hippie_van"), 13, 20, 270);
@@ -128,6 +128,9 @@ void game::init_morale()
//~ You really don't like wearing the Uncomfy Gear
_("Uncomfy Gear"),
_("Found kitten <3")

This comment has been minimized.

Copy link
@kevingranade

kevingranade May 18, 2015

Member

Missed a comma here.

return _("Can I interest you in a trim?");

} else if( topic == "TALK_RANCH_BARBER_JOB" ) {
return _("What? I'm a barber... I cut hair. There's demand for cheap cuts and a shave out here.");

This comment has been minimized.

Copy link
@Rivet-the-Zombie

Rivet-the-Zombie May 18, 2015

Member

I've had a laughing fit over this one, imagining my character hoisting her hairy leg up onto the counter and saying, "Give me a shave, my good man."

@kevingranade

This comment has been minimized.

Copy link
Member

commented May 18, 2015

Awesome content as I've come to expect, I'm super excited about the direction you're going with this one.
I did the bandit mission, got the range stuff spawned, but when I talked to the foreman he still had the "retrieve prospectus" dialog option after I triggered it once (then he gave me a second prospectus when I tried it again), and when I asked him for a job he asked me about blankets instead of about lumber.

@kevingranade

This comment has been minimized.

Copy link
Member

commented May 18, 2015

Also tried to hire the Lumberjack to deliver some wood, but the dialog went straight to "The rate is a bit steep...", which I think is supposed to be the "never mind" dialog option.

@kevingranade

This comment has been minimized.

Copy link
Member

commented May 18, 2015

The well mission keeps asking for "stone", but the item they want is "rock", could be confusing.

@kevingranade

This comment has been minimized.

Copy link
Member

commented May 18, 2015

Once the palisade is up, you need to leave the perimeter to go from the garage to the barn, is that intended?
With the second well mission, the foreman asks you for pipes, but when you return he asks if you have the motors.
Note for the future, if you're over-prepared the whole mission process can proceed unreasonably fast, it'd be nice to have a little bit of a wait imposed between missions.
Another nice to have would be a message from the foreman when new workers arrive instead of having to hunt them down.
Foreman didn't have anything but a tool belt as a reward the whole time I've done the missions.
After the foreman told me to talk to the scrap manager about missions, he still didn't have any for me.
Whoops, I was talking to the wrong guy, I thought the guy in the garage with the deathmobile was the scavenger boss.
At some point puddles of gasoline appeared near the fields to the NW of the compound, no idea why from looking at the code.
Barber conversation, he replies to "I'm looking for information..." with "I can't imagine what I'd need your assistance with.", doesn't seem to match up.
Foreman seems to go into a loop once you get him the glass for a greenhouse, keeps asking for more.
Same deal with the nurse, keeps asking for more syringes.
Once the bar appeared, it had three bartenders and three mercs, is that supposed to happen?

if( state == "TALK_MISSION_DESCRIBE" ) {
return _("We need help...");
} else if( state == "TALK_MISSION_OFFER" ) {
return _("Clothing that can withstand the wear and tare of climbing through windows and fighting back "

This comment has been minimized.

Copy link
@kevingranade

kevingranade May 18, 2015

Member

wear and tear

@acidia

This comment has been minimized.

Copy link
Contributor Author

commented May 18, 2015

-Ok, so the barn does have a door on the East side that can be accessed by going around back of the garage and down. I don't remember which stalls have people in them but I could push it up one or two in the future.
-I'll look into doing a little popup thing for major characters but I do like a bit of surprise to find a person or two of interest.
-Having a minimum cool-down between missions is something I can add for pt 2... it is easy enough to add back in but it was annoying to debug with it so I cut it out
-Items as rewards were an afterthought, I was thinking with 20-30 missions in a central location most people would round out or buff skills
-I've noticed the gasoline and will try and track it down in pt 2
-the final missions are all on repeat... this lets me hook in the next mission without having the player restart the outpost. The triple bartenders/merc are a result of you completing the last foreman mission twice and accepting it a third time.

I've got the first few companion missions in game but I'm stuck on an error thrown when deserializing an NPC and adding it back to the list... seems to want to cast it as a player and throw a bunch of errors associated with morale_point??? I'll post it in pt 2 when this goes through.

@jokermatt999

This comment has been minimized.

Copy link
Contributor

commented May 24, 2015

" I'll post it in pt 2 when this goes through."

So are you creating another pull request for merge, or coming back to this one? As of now, it shows as unmergeable. I've been looking forward to this getting merged, but it seems to be in limbo for now.

Merge remote-tracking branch 'origin/master' into Commune
Conflicts:
	src/mission_start.cpp
	src/player.cpp

Pulling Updates
@acidia

This comment has been minimized.

Copy link
Contributor Author

commented May 24, 2015

Good question, I was standing by to hear what the plan was. I can resolve the merge errors (hopefully) but unless someone is planning on merging it then it will be unmergeable shortly simply due to the number of files that it alters.

@Zireael07

This comment has been minimized.

Copy link
Contributor

commented May 24, 2015

Plz merge ASAP and then @acidia can just make a second PR.

@kevingranade

This comment has been minimized.

Copy link
Member

commented May 24, 2015

Sorry about that, had no free time recently.

@kevingranade kevingranade self-assigned this May 24, 2015

@kevingranade kevingranade merged commit 8c2d1d6 into CleverRaven:master May 24, 2015

1 check passed

default
Details
@Rivet-the-Zombie

This comment has been minimized.

Copy link
Member

commented May 24, 2015

Sees merge.

Squees!

@acidia

This comment has been minimized.

Copy link
Contributor Author

commented May 25, 2015

Wooo, part II will be up shortly!

@Sirbab

This comment has been minimized.

Copy link

commented May 25, 2015

I see your squee, and raise you one. That being said, would it be safe to start a new game with the current part 1 Build, or would you recommend waiting for part 2?

@acidia

This comment has been minimized.

Copy link
Contributor Author

commented May 25, 2015

There shouldn't be any issues. NPCs will have weapons that actually match their skills in part 2, but that is the only major existing bug that I fixed so far. The content is accessed through chat topics that will update automatically once part 2 lands.

These commune missions definitely start having a stronger RPG feel to them... so don't expect to knock out all of the missions quickly. By the time the average player hits the last mission they will have spent a number of hours getting there... I'll try and avoid having people restart the commune at all cost.

@acidia acidia referenced this pull request May 25, 2015

Merged

[DONE] Commune II #12462

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.