Currently the developers are putting their own money into JC2-MP to keep the servers online.

Please take a few seconds of your time and disable your AdBlock plugin for our website.

Ad revenue is not going to developers, it is used purely for covering our hosting costs.


You are also free to donate, which removes all ads from our website!

Patch 0.3 was just released! Full changelog here:

2 years ago

October 19, 2019, 06:17:07 am

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - keeri

Pages: [1] 2 3 ... 20
Releases / Re: [Release] Basic Anti-Cheat
« on: September 16, 2019, 03:22:27 pm »
the server module runs in a single instance (not per player like the client modules do), so having
Code: [Select]
self.phealth = 1on the server means it will get overwritten by each player; if you want to store values per-player, use sender:SetValue(key, value) and sender:GetValue(key). you can also use a table of player values:
Code: [Select]
self.phealth = {}

self.phealth[ sender:GetId() ] = sender:GetHealth()
but you will need to manually clear them on PlayerQuit event by setting their value to nil.

Code: [Select]
function GodCheck:CheckThisPlayer( args, sender )
self.phealth = sender:GetHealth()
if sender:GetHealth() >= self.phealth then
that's equivalent to "if true then", since you overwrite the previous value with current value before performing the checks

Guest forum / Re: I can't log into Steam.
« on: August 26, 2018, 10:07:30 am »
your game library is set to private, so we can't check that you own Just Cause 2

JC2-MP / Real Life Server redesign
« on: August 05, 2018, 08:57:26 am »
April 3, 2017

- Out of the entire 2017, the binoculars are the only visual change I recall being done. Throughout that year I had little time and determination for any significant changes, and all the focus was on bug fixes, small features and improvements. I added the wingsuit, tweaked captures.. even with changelog in front of me, that year is still blurry.

~ for some reason, 2018 came out slightly different ~

Black Market
July 3, 2018

- It started with this window, and while it's still not looking very good, I'm glad how it turned out. 3 clicks to get both weapons, simple icons for readability. Moving on.

Territory HUD
July 3, 2018

- This HUD honestly should have been improved years ago, the influence and defense used to appear right after the location name and you had to guess what they mean, level info wasn't pretty, and instead of describing what the location does (like healing infantry in this case) it used to say [ H ]. Yeah, [ H ], and you had to learn it means hospital.

Chat Interface
July 4, 2018

- From the amount of "wwwwwwwwwwwwwwwwwddd" in the chat you could tell that the input rectangle was very difficult to notice, and many players weren't even realizing they are typing in the chat. And I thought.. while I'm at it, might as well add explanations to every single chat command there is, because the difficulty curve is just.. bad. But we'll get to it later. Oh, and the visible hotkeys. T to chat, Y to switch chat tab, N to change name, F to use grapple hook, and so on.

Map Legend
July 5, 2018

- While the map is fairly simple, having a legend is nice. If a new player wants to capture a location, and they stumble at the legend, they can find out that to initiate a capture they need to be Rank 2, and the location needs to have a yellow highlight around it. Airports now look different from regular points, and bank/casino now appear on the map. All of these are very important locations, again, no idea why they weren't added earlier.

Player List
July 6, 2018

- Having colorful rectangles is nice, but it is much more intuitive with the faction names/icons here as well, even the online counts in each faction. As you can see, we don't have many online players these days, as the game is years old and all. But there are many people who want it to change, so I don't mind doing any of this. It's fun to see how the server would look if I did all the things right at the start, it's fun to work on it, and it's fun to see old, present and new players enjoying it.

Character Name Change
July 7, 2018 (and the outfit selector on July 27)

- The new name change UI adds an ability to generate unique character names, and tries to explain which names are allowed, and which are not. Weeks later I've added the arrows to switch player model, a fair alternative to typing '/skin' in the chat about 45 times.

Vehicle Purchase
July 7, 2018

- The tweaked UI is still not very pretty, but has 4 categories to make it easier to choose a vehicle, even if the player has no idea how it looks like. Also adds a button to switch between currencies (faction's Vehicle Parts for elites, or own spending cash), which could only be done with a hotkey before. Allows to order a vehicle in mid-air again, because why take the fun away?

Player Tags
July 8, 2018

- Tried to make these slightly more slick. Prettier stars for bounty hunting, health shown as text for better readability.

Delivery Contracts
July 9, 2018

- Now shows the map to make it more clear where the delivery destination is, and the influence for each location.

Level HUD
July 12, 2018

- Shows every XP and new Level that you earn. Bars a bit thicker too.

HQ Icons
July 13, 2018

- The old icon used to show where the faction HQ is, but there was nothing to interact with. New icons show the plane hangar, faction shop and garage. The shop will have many more interesting items from now on.

July 13, 2018

- Item quality names were clearly underappreciated, and now you can see them all the time, in front of the item name. In fact the entire inventory backend has been rewritten, and now there are many new items. The shop selling oranges will no longer restock on orange crayons!

Mission Marker
July 15, 2018

- I've experimented with mission rays before, but they used to appear only to the new players. New marker is visible to everyone, and has the colors of factions who are currently in control of the objective.

Radar Icons
July 15, 2018

- Radar icons and colors were improved throughout many days, but they did not change as much as the in-game tags. You can see the nearby garages now, though.

Construction Tools
July 28, 2018

- The build tools for faction leaders were rewritten, to be more intuitive and convenient to align objects next to each other.

July 30, 2018 (and the money UI on August 2)

- Sadly the tutorial might be fairly annoying at times, but I put a lot of hope in it to introduce new players to all the features that might look quite complicated. It's flexible, if you are in a plane - it will teach you how to take off, if you are at the bank - it will teach you how to send money to your offshore account, if you are on a shore - it will teach you how to catch fish.

Ally Tags
August 2, 2018

- Panau is frickin huge! But that doesn't mean you should be playing alone, and while the radar used to show the directions for allies, and the map displayed their exact location, there is one more thing I wanted for a long time, and it's showing the player locations directly in the game, even if they are far away.

~ that's all the important stuff. oh, and ~

Most of the code has been rewritten
- To ensure everything runs fast, and the delays are reduced to minimum

Capture mechanics have been updated
- Balancing is now done with increased damage, outnumbering is allowed
- Influence drop stage has been removed

Damage system has been changed
- In old system, if you missed the player model (blue)...
you had 33% chance to hit in the red circle, and 66% in the orange

- In the new system, if you miss the player model (blue)...
you deal from 1% to 100% damage, based on how precise you aim (no RNG)

Trade and convoy missions are back
New hit marker, showing vehicle health
Emoticons are converted into roleplay actions
Improved vertical take off for Pell planes
Fair faction salaries and visible expectations
Slow K22 helicopter replaced with a faster K23
Over 50 minor bug fixes
and many other things...

~ thanks for being around ~

Join our Discord server

Find us in JC2-MP

See the complete changelog

Support the project on Patreon

But most importantly...
Have fun

Pусский (Russian) / Re: Проклятые краши!
« on: February 09, 2018, 02:24:41 pm »
как вы говорите это изо большого кол-ва транспорта в одном месте. С этим можно согласиться, но это еще и называется ОПТИМИЗАЦИЯ.
это было лишь догадкой, но я потратил час времени на тестирование разных версий клиента/сервера, и причина действительно в этом. насчет того как это называется я спорить не буду, обьяснять что движок физики, к которому у нас нет прямого отношения, имеет свои ограничения, довольно долго. репорт другим разрабам отправил, насчет того получится ли исправить обещаний дать не могу, баг появился после довольно крупного изменения

все стоковые скрипты есть тут
если есть баг репорты по ним или исправления - можно отправлять как pull request

все что в FireEvent - неофициальный функционал из оригинальной игры, его мы по сути никак не поддерживаем

Pусский (Russian) / Re: Проклятые краши!
« on: February 08, 2018, 12:19:26 pm »
мб из-за отрисовки во время телепортации, или еще какой конфликт с другими скриптами, сложно сказать.. отсылать не бесполезно т.к. даже если определить причину по ним сложно - они дают статистику по самым проблемным местам, которые потом решаются с приоритетом. конкретно ваши краши найти сложно т.к. айпи разные от тех что на форуме - если есть желание можете скинуть айпи в личку после отправки краша, постараюсь посмотреть отдельно по ним.

сейчас значительная часть разрабов довольно заняты и свободного времени у них, к сожалению, не очень много (как и у меня), поэтому просто "ждать патчей" без поддержки сообщества - почти не вариант. попробуйте дерби на других серверах, опять же, если есть желание помочь, сравните крашит ли там. на выходе дерби такая же телепортация в точку на карте как в телепортах, возможно, например, что физика игры не выдерживает от количества транспорта в той точке, или еще что. если проблема только на конкретных серверах, можете их айпи поделиться, больше информации - больше шансов что-то пофиксить.

Pусский (Russian) / Re: Проклятые краши!
« on: February 07, 2018, 03:26:37 pm »
крашрепорты отсылали?

Releases / API Shortcuts
« on: October 24, 2016, 09:50:01 pm »
This's a small collection of API extension snippets that I wrote back in the time, but never got around to make a detailed topic on how to use them.

This wiki page explains where to create these autorun scripts and what's needed to enable them.

Code: [Select]
function NetworkObject.Value(name, key, default)
local data = NetworkObject.GetByName(name)
if not data then return default end
return data:GetValue(key, default)

function SharedObject.Value(name, key, default)
local shared = SharedObject.GetByName(name)
if not shared then return default end
return shared:GetValue(key, default)

function SharedObject.Values(name)
local shared = SharedObject.GetByName(name)
if not shared then return nil end
return shared:GetValues()

function SharedObject.Update(name, key, value)
local shared = SharedObject.GetByName(name) or SharedObject.Create(name)
shared:SetValue(key, value)

function SharedObject.Recreate(name)
local shared = SharedObject.GetByName(name)
if shared then shared:Remove() end
return SharedObject.Create(name)

function SharedObject.Delete(name)
local shared = SharedObject.GetByName(name)
if not shared then return false end

Code: [Select]
function WorldNetworkObject.Value(objectId, key, default)
local data = WorldNetworkObject.GetById(objectId)
if not data then return default end
return data:GetValue(key, default)

function WorldNetworkObject.Update(objectId, key, value)
local data = WorldNetworkObject.GetById(objectId)
if not data then return false end
data:SetValue(key, value)

function WorldNetworkObject.Sync(objectId, key, value)
local data = WorldNetworkObject.GetById(objectId)
if not data then return false end
data:SetNetworkValue(key, value)

function NetworkObject.Update(name, key, value)
local data = NetworkObject.GetByName(name) or NetworkObject.Create(name)
data:SetValue(key, value)

function NetworkObject.Sync(name, key, value)
local data = NetworkObject.GetByName(name) or NetworkObject.Create(name)
data:SetNetworkValue(key, value)

Those add the following functions:

client / server
SharedObject.Update(name, key, value)
Set value for given SharedObject name and key.
If the object doesn't exist, it will be created.

client / server
SharedObject.Value(name, key, default)
Get value for given SharedObject name and key.
If the object or value doesn't exist, will return default or nil.

client / server
Get a table of all values for given SharedObject name.
If the object doesn't exist, will return nil.

client / server
Re-create the SharedObject with that name, wiping all existing values.
If the object doesn't exist, it will be created.

client / server
Remove the SharedObject with that name.
If the object doesn't exist, will return false.


NetworkObject.Update(name, key, value)
Set server value for given NetworkObject name and key.
If the object doesn't exist, it will be created.

NetworkObject.Sync(name, key, value)
Set networked value for given NetworkObject name and key.
If the object doesn't exist, it will be created.

client / server
NetworkObject.Value(name, key, default)
Get value for given NetworkObject name and key.
If the object or value doesn't exist, will return default or nil.


WorldNetworkObject.Update(objectId, key, value)
Set server value for given WorldNetworkObject objectId and key.
If the object doesn't exist, will return false.

WorldNetworkObject.Sync(objectId, key, value)
Set networked value for given WorldNetworkObject objectId and key.
If the object doesn't exist, will return false.

WorldNetworkObject.Value(objectId, key, default)
Get value for given WorldNetworkObject objectId and key.
If the object or value doesn't exist, will return default or nil.


Example 1

When working with more than two fields of a single object, I would recommend using regular API features, but when you only need to store, sync or read a single value or two, you can use these shortcuts.

Code: [Select]
NetworkObject.Update("Wind", "Changes In", 60)
NetworkObject.Sync("Wind", "Direction", 180)

Code: [Select]
print( NetworkObject.Value("Wind", "Changes In") ) -- returns nil, because it's a server value
print( NetworkObject.Value("Wind", "Direction") ) -- returns 180, if the client had waited enough for value to sync
print( NetworkObject.Value("Wind", "Strength", 15) ) -- returns 15, because the value doesn't exist


Example 2

Simple use case of SharedObject shortcuts, with the deletion of the object at the end when it's no longer necessary. The objects and values are available on the same side they have been created on, in this case, the server side.

Code: [Select]
print( SharedObject.Value("Lottery", "Winner", "None") ) -- returns None, because the object doesn't exist
SharedObject.Update("Lottery", "Winner", "Rico Rodriguez")
print( SharedObject.Value("Lottery", "Winner", "None") ) -- returns Rico Rodriguez


And a small bonus, two simple functions for working with iterators.

Code: [Select]
iterator = {}

function iterator.populated(self, method)
for _ in method(self) do
return true
return false

function iterator.count(self, method)
local count = 0
for _ in method(self) do
count = count + 1
return count

Those add the following functions:

client / server
iterator.populated(self, method)
Returns true if the iterator contains anything.

client / server
iterator.count(self, method)
Returns the amount of items the iterator goes through.


Example 1

Check if any other players are streamed in, perform an action based on whether anyone is near or not.

Code: [Select]
if iterator.populated(Client, Client.GetStreamedPlayers) then
print("There are other players nearby!")
print("Noone else is around, hold G to pick a teleport location.")


Example 2

Please do mind that Server:GetPlayerCount essentially does the same thing in a better way, counting players is only used here as an example. This function might be more useful for counting items in StreamableObject:GetStreamedPlayers and such.

Code: [Select]
local count = iterator.count(Server, Server.GetPlayers)
print("Players online on the server: " .. count)


That's all to it, let me know if you spot any mistakes.

Scripting support / Re: Is Valid()
« on: September 01, 2016, 11:27:51 am »
By default IsValid checks if the object not only exists, but also streamed in.

Bug reports / Re: Flickering in sky and fog
« on: June 09, 2016, 07:42:51 am »
Surprised the solution has not yet been posted, this is a fairly prevalent issue that can be fixed by turning off Bokeh in the singleplayer graphic settings.

Troubleshooting / Re: Game crasher after some time
« on: March 10, 2016, 10:45:15 pm »
Have you tried disabling the Steam overlay and decals in graphics settings?

Releases / Re: [RELEASE] Extra Seats
« on: February 20, 2016, 03:11:30 pm »
You'd have to combine it with this

JC2-MP / Re: Real Life Server - Roleplay
« on: February 20, 2016, 02:54:31 pm »
Another summary on latest changes.

Recruitment has been rewritten from scratch, which should hopefully make it easier for new players to start. Joining a faction can now be done by talking to a faction recruiter NPC, and the players are automatically sent to the faction HQ, where they can complete an optional tutorial, or skip it and head into gameplay.

Welding drones have been added to the ground support vehicles. They will fly around the vehicle and repair it when possible.

Location interests have been overhauled, a location will now be interested in purchasing multiple items, instead of a single item type.

Custom map now shows locations of the weapon and vehicle part contracts. Additionally, it is now possible to place waypoints directly from the map.

Delivery contracts now show location owner and direction of the contract on the radar.

Complete changelog is available on Trello

Scripting support / Re: More lua help sorry
« on: February 13, 2016, 06:28:11 pm »
You can modify the following script

Scripting support / Re: SortedList wrap column
« on: February 13, 2016, 06:15:58 pm »
Code: [Select]
sorted_list:AddItem("Text that needs wrapping"):GetCellContents(0):SetWrap(true)

Откаты были из-за рестартов, скорее всего. Это в тему про сервер выживания нужно писать.

Pages: [1] 2 3 ... 20