Author Topic: Dglider's CityRPG  (Read 4581 times)

Hey there, Dglider here.  A few weeks ago FlavouredGames took down his CityRPG.  I am rehosting it with some changes.  He couldn't find a recent save, but he gave me an old save to work with.  I've modified the map a bit, so here is what it looks like now:



As far as gameplay goes, I've modified the sellFood and sellItem events to give more profit to the seller by default.  In addition, the prices of items belonging to sellers who are offline will increase as they sell items.  This helps people who are online (and actually playing) make more money.
I added the Apartment Events from McTwist.  So you can now rent out rooms.

I wasn't sure what to do with all of the abandoned builds last week, so I've developed a system whereby ugly or abandoned buildings get a stack of notices placed in front of them.  At the end of each week, a single notice is deleted from the top of the stack.  If the stack is emptied, the lot is put up for sale by the city.  An admin can sell it to you and dupe it into your ownership.
If the original owner of the building returns to the server and their lot is unsold, they can have their lot back for free, no questions asked.
The intent behind this system is to ensure that the main island isn't clogged up with unused builds. I don't plan on vetting the extra islands very much.


The server will open every weekend from Friday @ ~4PM PST until Sunday @ ~7PM PST.


HEY my base of the house still there?


i hope it has good management and not broken/bad mechanics unlike 90% of the rest of them
edit: i see some balances but i drew away from this server once i saw i was being chat spammed by the info button - i want to know how to play the gamemode by not typing really long answers 90% of the time
there are too many rules, especially a few really stupid ones
its just like any other cityrpg, youll only like the server if you like the nostalgia of cityrpgs
 
in possible defense of the server i was only playing for 10 minutes but a lot of things drew me away to even want to play the gamemode in general
« Last Edit: August 12, 2018, 06:34:19 PM by Kyuande »

So just a typical CityRPG? Great.

I fixed a pretty terrible bug which made long term hosting of a CityRPG laggy.  Thank you Buddy for helping me figure that out.
/dropMoney, /dropDrugs, and /giveMoney were disabled on the last day, after they were abused to crash the server.  Those will be fixed next weekend.
Selling drugs cannot be done super quickly anymore, though I'm told it still spams the seller if they try.
Bounties now require a minimum of 10% of your total money.  An additional 10% city tax will be inflicted upon the bounty.
Negative amounts of drugs can no longer be dropped.

I am now level 12 in Car Mechanic Simulator 2018.



The server will be up again next weekend.  I hope y'all got what ya came for.

The CityRPG is back up.

/dropdrugs, /dropmoney, and /givemoney can now only be used once every 5 seconds.
All non-law jobs no longer spawn with guns.
"The City" now shows up as the cop name when someone is arrested while leaving the game.

Here is a current picture of the main island:

Could you maybe enable some wedge bricks to this server?
I love working with them, they make builds look more detailed by allowing you to do diagonal walls. Makes buildings don't look so square.
Just the normal wedges would do fine.


The server seems to have crashed at around 3 AM last night.

Could you maybe enable some wedge bricks to this server?
I love working with them, they make builds look more detailed by allowing you to do diagonal walls. Makes buildings don't look so square.
Just the normal wedges would do fine.
Done.

The criminal system has been updated!
If you perform a crime, you do not automatically get demerits.
If you see a crime, you can call 911 to report the criminal.
All law professionals will receive the report after 30 seconds.
Non-Law jobs no longer spawn with guns.

Aug 20
Modified afk kicker to not kick the host. (woops)

Server is over.  See you next week.
« Last Edit: August 20, 2018, 10:22:38 AM by Tendon »

The server is up again.

Added NewJeep
Banned Jeep
Added Sail Boat
Enabled RowBoat
(Finally) Enabled Keypad Events
Added DoorCheck events

Wand no longer bounces people up above street level.
Fixed /deductmoney.
Fixed gameconnection::arrest bug found by Deneb
Fixed pickpocketing bug found by Fate
Pickpocketing now requires that you be crouched.
Pickpocketing no longer gives rewards if you fail.
Pickpocketing now properly detects your target's line of sight.
Drugs now obey economics, and will sell for lower prices while the market is flooded.

08/24/2018 - ~8:45
The NewDuplicator has been modified to work with this CityRPG.
   Thank you, Queuenard.

There may eventually be a better solution, but this is my solution:
   This automatically loads a module we define later.
   Place it at the end of server.cs:
Code: (Gamemode_CityRPG/server.cs) [Select]
if($AddOn__Tool_NewDuplicator)
{
ForceRequiredAddOn("Tool_NewDuplicator");//no harm done if it doesn't load, but it MUST be loaded so this next part can overwrite it.
exec("./modules/newduplicator.cs");
}

   This is a modified version of serverCmdPlantBrick() found in Gamemode_CityRPG/package.cs.
   It does various checks to determine whether a brick should be planted or not.
   Place this code somewhere in common.cs:
Code: (Gamemode_CityRPG/common.cs) [Select]
function GameConnection::CRPGPlantCheck(%this, %brick, %silent)
{
if(%this.isAdmin)
return 1;

%brickData = %brick.getDatablock();

if(%brickData.CityRPGBrickAdmin && !%this.isAdmin)
return 0;

if(mFloor(getWord(%brick.rotation, 3)) == 90)
%boxSize = getWord(%brick.getDatablock().brickSizeY, 1) / 2.5 SPC getWord(%brick.getDatablock().brickSizeX, 0) / 2.5 SPC getWord(%brick.getDatablock().brickSizeZ, 2) / 2.5;
else
%boxSize = getWord(%brick.getDatablock().brickSizeX, 1) / 2.5 SPC getWord(%brick.getDatablock().brickSizeY, 0) / 2.5 SPC getWord(%brick.getDatablock().brickSizeZ, 2) / 2.5;

initContainerBoxSearch(%brick.getWorldBoxCenter(), %boxSize, $typeMasks::triggerObjectType);

while(isObject(%trigger = containerSearchNext()))
{
if(%trigger.getDatablock() == CityRPGLotTriggerData.getID())
{
%lotTrigger = %trigger;
break;
}
}

if(!%lotTrigger && %brickData.CityRPGBrickType != 1)
return 0;

if(CityRPGData.getData(%this.bl_id).valueMoney < mFloor(%brick.getDatablock().initialPrice))
return 0;

if(!%lotTrigger && %brickData.CityRPGBrickType == 1 && %this.brickGroup.lotsOwned >= $CityRPG::pref::realestate::maxLots)
return 0;

if(%lotTrigger && %brick.getDatablock().CityRPGBrickType != 1)
{
%lotTriggerMinX = getWord(%lotTrigger.getWorldBox(), 0);
%lotTriggerMinY = getWord(%lotTrigger.getWorldBox(), 1);
%lotTriggerMinZ = getWord(%lotTrigger.getWorldBox(), 2);

%lotTriggerMaxX = getWord(%lotTrigger.getWorldBox(), 3);
%lotTriggerMaxY = getWord(%lotTrigger.getWorldBox(), 4);
%lotTriggerMaxZ = getWord(%lotTrigger.getWorldBox(), 5);

%brickMinX = getWord(%brick.getWorldBox(), 0) + 0.0016;
%brickMinY = getWord(%brick.getWorldBox(), 1) + 0.0013;
%brickMinZ = getWord(%brick.getWorldBox(), 2) + 0.00126;

%brickMaxX = getWord(%brick.getWorldBox(), 3) - 0.0016;
%brickMaxY = getWord(%brick.getWorldBox(), 4) - 0.0013;
%brickMaxZ = getWord(%brick.getWorldBox(), 5) - 0.00126;

if(%brickMinX < %lotTriggerMinX || %brickMinY < %lotTriggerMinY || %brickMinZ < %lotTriggerMinZ || %brickMaxX > %lotTriggerMaxX || %brickMaxY > %lotTriggerMaxY || %brickMaxZ > %lotTriggerMaxZ)
return 0;
}

if(%lotTrigger && %brickData.CityRPGBrickType == 1)
return 0;

//it is necessary to disable this for apartment bricks to work.
//if(%lotTrigger && getTrustLevel(%lotTrigger.parent, %this.player) < 1)
//{
// commandToClient(%this, 'centerPrint', (getBrickGroupFromObject(%lotTrigger.parent).name $= "") ? "\c1BL_ID:" SPC getBrickGroupFromObject(%lotTrigger.parent).bl_id : getBrickGroupFromObject(%lotTrigger.parent).name SPC "\c0does not trust you enough to do that.", 1);
// return;
//}

if(%lotTrigger && %brickData.getID() == brickVehicleSpawnData.getID() && CityRPGData.getData(%this.bl_id).valueMoney < mFloor($CityRPG::prices::vehicleSpawn))
return 0;

if(%lotTrigger && %brickData.CityRPGBrickType == 420)
{
for(%a = 0; %a < %this.brickGroup.getCount(); %a++)
if(%this.brickGroup.getObject(%a).getDatablock().CityRPGBrickType == 420)
%drugsOwned += 1;

if(%drugsOwned >= $CityRPG::Drugs::DrugLimit)
return 0;
}
return 1;
}

Attached to this post is the code for Gamemode_CityRPG/modules/newduplicator.cs.
It is a copy of a function from Tool_NewDuplicator/classes/server/selection.cs  |  verison 1.6.2
The extra lines can be seen on lines 16-19 and lines 211 to 217.


08/25/2018

A new event has been added: spawnPinball
   This event has a timeout on it per brickgroup, to help prevent spam.
The setapartment event has been modified:
   Set the owner to -1 to allow anyone to build on your brick.
      If that setapartment event is disabled, the brick does not allow random people to build on it.
      This can be used to automate the renting of a particular room.
« Last Edit: August 26, 2018, 12:44:25 AM by Tendon »


@ ~09:39

Restarting...


08/26/18

The drug prices have caused some complaints.  Which means they are working.
I am going to try to make some jobs more interactive, and I would like to add some new jobs.
If you're playing on the server and you come up with a brilliant job idea, post it here so it's easy to keep track of.


Alpica suggested a taxi job.
   I assume this would involve picking up and dropping off NPCs for money.
honytawk suggested an office worker job.
   This would probably involve comparing two documents and searching for inconsistencies, and then either filing the document away, or marking it and sending it back.
honytawk suggested a CEO job.
   This would involve profiting from the work of others by building a location for one of the other jobs.(Miner, Factory Worker, Office Worker, etc.)
Illegible suggested a package delivery job.
   This job would involve delivering packages to a specific X,Y coordinate by a certain date.
Illegible suggested an ice cream truck job.
   The ice cream truck driver would sell food from an ice cream truck.
Illegible suggested utility worker job.
   The utility worker would repair sewage lines, power lines, roads...
Illegible suggested news reporter job.
   The news reporter would be able to write news reports... server news, new builds, etc.  The newspapers could be sold.
Illegible suggested a Financial Planner job.
   This job would give the user access to all of the prices, harvest amounts, city income, city stock, who has what job, etc.
   The financial planner could use this information to advise others on what the best thing to plant or best job to do is.
Illegible suggested a Muscle job.
   The Muscle can be hired by anyone, to do anything.  They are paid any specified amount every tick, from their client's bank account.
« Last Edit: August 29, 2018, 01:55:43 PM by Tendon »

I am going to try to make some jobs more interactive, and I would like to add some new jobs.
If you're playing on the server and you come up with a brilliant job idea, post it here so it's easy to keep track of.

How about an office worker.
Like a laborer, but instead of mining ore with a pickaxe, you "sign" papers with a pen.

A more advanced job would being able to start your own company.
You can start your own mine, lumberyard, office, ... by buying the resource blocks for your lot
And for every player mining your ores, you get a percentage.

The drug prices have caused some complaints.  Which means they are working.
lol

How about an office worker.
Like a laborer, but instead of mining ore with a pickaxe, you "sign" papers with a pen.

A more advanced job would being able to start your own company.
You can start your own mine, lumberyard, office, ... by buying the resource blocks for your lot
And for every player mining your ores, you get a percentage.
tbh the way ty/ did companies was a lot easier and more simple
you could pay 10-20k to buy shares for a company and you'd get like triple that or smth every day