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:

3 years ago

July 14, 2020, 02:05:31 pm

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.

Topics - Dev_34

Pages: [1]
Releases / [Release] FC Script Pack
« on: April 10, 2016, 08:58:37 am »

Hi everyone, I'm one of the people who worked on the Fallen Civilization server between 2015 and 2016.

In case you're not familiar with us, Fallen Civilization was a project for a survival server that involved four coders (myself, Lord_Farquaad, Misterff1, and __init__)
Here's a link to our old forum thread:,5765.0.html

As we've said before on our old thread, we've decided to close down the server.
We also promised to release all of the server's scripts.

The pack we're releasing right here is the working version of the server at the point of shutdown.
It clocks in at just under 37,000 lines of code and features a lot of different concepts that we feel would be useful for other coders in the community.

For your convenience, we've added a readme file to each module that gives a brief description of what the module does.
We've also supplied instructions to those interested in running a stand-alone version of this pack as a server.
Regarding this, I'd like to restate that we give full permission for anyone to run any or all of these scripts as a server, and to name this hypothetical server whatever they please.
We would appreciate people to give credit where credit is due.
However, please see our license if you're considering re-releasing our code.

This first pack contains only the content running on the server at the time of shutdown.
We still have a lot of content created that we had planned for the server but that had not been finished yet.
This upcoming content will be released fairly soon in a second pack which I estimate will be at least another additional 5,000 lines of code.
While all the scripts in pack #1 work together seamlessly, pack #2 will most likely require more work to integrate with pack #1, if this were to be desired.

If anyone has questions regarding these scripts, don't hesitate to ask us.

Scripting support / SQL Database Image Error
« on: March 09, 2016, 09:11:39 pm »
I've been having an issue with the SQL database of my server where a certain error occurs when scripts interact with the database.

The error is:
Code: [Select]
Runtime Error: Error when executing SQL command: database disk image is malformed

I've looked online a little and can't seem to find out why this would occur.
When opened in a sqlite database browser, the data seems to be fine and present, but for certain records/rows/players, it throws this error.

While the database is largely functional, when this disk image error happens there is a chance for the server to crash and the database to rollback, which is very problematic since we store a lot of player data.

Does anyone more familiar than me with SQL know what causes this error and how to fix or work around it?

----- EDIT -----

I've done some research on the issue and have found a solution.

Executing this line of code on the database:
Code: [Select]
PRAGMA integrity_check;
returned an error, meaning the database was corrupt.

In order to fix the issue, I downloaded SQLShell(

I then dumped the database by executing this in SQLShell with the database loaded:
Code: [Select]
.mode insert
.output dumped_db.sql

This resulted in a text file with approximately 150,000 CREATE and INSERT statements necessary to re-create the database.

I then created a new database using my database browsing tool and the database dump. (

I executed the database dump's SQL commands on the new database.
Strangely, I found several records with unidentifiable characters and many duplicate columns in several different tables with 'UNIQUE' columns.

After getting rid of duplicate records and removing any garbage data (which sqlitebrowser detected), the database seems to be working fine, according the integrity_check PRAGMA.

After learning that there is apparently a whole API for creating back-ups of SQLite databases during run-time, I believe the corruption may have started with my nonchalant making of back-ups while the server was running and the database was being written to.

I hope this information can be of use to anyone who experiences these issues in the future and I advise server owners to be cautious when making back-ups.
I now make back-ups when the server is offline.

Scripting / WorldNetworkObject vs. StaticObject
« on: February 26, 2016, 06:27:53 am »
I've found myself being put in the scenario where I need to sync something in the game world, and have a  hard time deciding whether I should use a WorldNetworkObject or a StaticObject.

In a specific situation I'm currently in, I need to sync a whole group of StaticObjects.
With multiple objects, it's obviously more efficient in terms of network usage to have one synced object moving in the game world that clients can use as a base position for spawning other objects, using ClientStaticObjects.

While for the above scenario it would logically make sense to use a WorldNetworkObject since the only attributes of the synced object that would need to be used are position, angle, and network values, WorldNetworkObjects occasionally don't load in properly when the client first joins, which can become a big issue in some cases. This makes the use of the StaticObject for the same purpose far more enticing.

StaticObjects, on the other hand, are far older in the API and never have streaming issues.

To me it would make sense to use an invisible StaticObject in the place of a WorldNetworkObject, since almost all of the functionalities of the WorldNetworkObject are possible with a StaticObject.

The only significant differences I can think of are the WorldNetworkObject:GetValues() call that isn't possible for StaticObjects, and that there is no client-side GetWorldNetworkObjects() iterator. This and the other differences can be worked around fairly easily.

So I guess my questions are:

Which one should I be using if I want to have a group of StaticObjects synced, given that I wouldn't create all these objects as server-side StaticObjects, but rather be using one WorldNetworkObject or StaticObject to represent the group?

Is there a notable difference in networking efficiency between the two? Does the syncing of the model and collision for a StaticObject have a discernible impact on how fast it is synced among clients in comparison to WorldNetworkObjects who don't have these arguments?

Am I overthinking this?

On a side-note, does anyone know how all this network traffic adds up?
Would changing the position of a StaticObject server-side result in a figurative Network:Send() with the new position of the object?
In that case I could see Network:Send as a better alternative in cases where many nearby server objects need to be synced with clients, as one could aggregate this data into one Network:Send and send on a delay. This is assuming jc-mp doesn't already do something like this.

Community Projects / JC2MP Key ReMapper
« on: January 22, 2016, 05:09:00 am »
I've heard a lot of complaints from players with AZERTY keyboards that certain in-game scripted features in servers become hard to use or even unusable given that most jc-mp coders work with a QWERTY keyboard in mind.

While making key-binds in servers configurable would be the best option by far, this more than likely involves GUI code(eww) and tends to be viewed as fairly low-priority.

I decided to put together a simple AHK script today for all my AZERTY homies in JC2MP who might find it useful.
It works by launching the executable as Administrator on the Windows operating system, and inputting the key(or key combination) on the right side that you want to see when the key on the left side is pressed.
Then the window can be minimized with the Minimize button; using Alt-Tab or something similar may override a key field.

The script will only modify keystrokes when JC-MP is the current window you're looking at, meaning you can have it active and use other processes without interference. Note that leaving some fields blank may cause the script to throw errors.
For holding down keys, I had to adjust the script to DirectX's input polling, meaning it might be a bit choppier than usual. It should also be noted that the script will interfere with chatting via JC-MP, however there are two buttons to enable and disable the remapping.

You can remap up to 6 keys with one instance of the script.
This isn't a Lua script, and should be run independently of JC-MP on a Windows OS.

I'm not sure what the etiquette is surrounding the sharing of executable files, so feel free to do a virus scan first  ;)

Download Link:

JC2-MP / Fallen Civilization (Survival)
« on: November 28, 2015, 11:45:51 pm »
Hi JC-MP community,
I'd like to inform everyone that the the public beta testing period for the Fallen Civilization survival server will begin on December 1, 2015.

The Team
The server was largely created over a five month period by Dev_34 and Lord_Farquaad, with help from __init__
Our team is 4 people just like you:
Lord_Farquaad: He's been around since the initial jc-mp beta tests, even created JC2 mods before that; enjoys flying boats in his spare time.
 __init__: A robot hacker and programmer that loves developing both cool and whacky scripts for jc-mp.
Dev_34: Avid scripter having roots in jaxm's Battle For Panau server; loves to blow people up with a Panau Rocket Launcher
Misterff1: Casual coder known from the Freeroam Fun Server. He’s been around since the JC-MP Beta days and loves socializing with other players the most.

Alpha Stage Helpers: Ice Cream Man, {c4}Cobra, Dampe, TheStuffJunky, Bliss, prepchef, Thee Doctor

The Server
Approximately 22,000 lines of code that work together to create:

Influence Points System / Experience

- an experience-based level system that allows players to upgrade their character and unlock other powerful features
- players can accumulate experience from killing, completing server achievements, and more

Loot / Inventory / Storage System

- over 11,000 lootboxes hand-placed around Panau
- 3 tiers of lootboxes
- 5 tiers of loot items represented by different colors
- 6 categories of items
- entirely visual, all items have a corresponding picture
- players can place storages to place their items in

Cursed Areas

- dangerous areas in Panau where flying cars, a multitude of traps, NPC snipers, meteors(to be added), and scary lights offer players a risk/reward situation (these areas are stacked with loot)
- alternating areas in Panau become "cursed"


- a factions script adapted for survival gameplay
- players can create faction bases anywhere and upgrade their factions in multiple ways
- faction leaders can buy and place faction guards(NPCs/ClientActors), and a variety of deadly turrets to protect their base; they can also configure their guards and turrets to several modes of aggression


- an easy to use, level-based, crafting system that allows players to create special items from raw materials

Trading / Exchange

- state-of-the-art "safe-zones" where players can safely trade items from their inventories
- players also have access to crafting tables in these zones


- powerful companions that the player can unlock at a certain level after crafting a certain item and finding a certain hidden area
- players are given a red or blue pet based on their personality value
- personality values are calculated by your actions while in the server(but how exactly? we won't tell you  ;))


- a robust vehicle system that allows players to own and transfer vehicles


- the classic stamina limitation that affects sprinting, kicks(combat attack), and movement in general
- stamina is represented by the 'rainbow man' and can be upgraded with influence points

- a supported currency system called 'credits', used in many aspects of the server
- a 'friends' module that allows players to work cooperatively, e.g. use each other's vehicles
- custom server achievements that track player progress and offer rewards

Upcoming Events
- Release - January 6, 2016

We'd like to thank everyone that's supported our efforts over the last five months as we head into beta and then release.
Due to our inability to test our scripts extensively in a real jc-mp setting with lots of players, we've dedicated the next month to finding bugs, completion of several more scripts, and taking community input to shape the server.

We will also be giving [Beta] nametags to all players who participate at any point during the beta period, as our way of saying thanks.

Beta Notes
- the durability system for items is not stable enough yet, and will most likely be worked into the server during the second week of beta. this means weapons, grapplehooks, parachutes and other utilities will have infinite usage - enjoy it while it lasts
- a complete wipe of our databases will most likely occur in the transition between beta and release
- the beta tests will be used to assess gameplay balance, so please do not expect a balanced experience during the tests

You can join our steam group for more up-to-date information and to more easily contact us:
Fallen Civilization Steam Group

Server IP:

Scripting support / Exact position of GUI element in BaseWindow
« on: October 22, 2015, 11:07:19 pm »
I've been working with jc-mp's GUI features for a while and have need of getting the exact position of a GUI element relative to the entire screen that is a child of a BaseWindow.
There might be a specific method for this but I haven't gotten anything I've tried to work.
I realize it's possible to just add the position of the BaseWindow and the position of the element together, but, this isn't entirely accurate and tends to be inconsistent among varying screen resolutions.
Any advice is appreciated  :)

Releases / [Release] Longer Grapple
« on: August 23, 2015, 03:13:56 am »
Inspired by the single player mod, I decided to create a script that similarly allows players to grapple further distances than the standard grapple hook. The range and several other settings can be configured at the top of the file. This script uses the raycast function which doesn't seem to return the position argument past ~1250 meters so the script is limited to around this distance. Grappling trees or other tiny surface areas does not work very effectively. I'm guessing some freeroam servers might like this script.  :)

Bug reports / Vehicular Anti-Gravity Bug
« on: August 11, 2015, 06:16:12 am »
Lord_Farquaad and I have been working on scripts together for a server and have encountered a bug in one of the scripts that he made.
Basically, the script spawns around 3 vehicles per second near the players of the server if they are in a certain area. The linear velocity of the vehicles is set in the creation arguments and propels the vehicles at the players from above or from in front of them at about 100 m.p.h usually. The vehicles healths' are also set to .01 as a creation argument, although the bug persisted when health was not altered.
After being spawned, the vehicle is not handled in any way besides being deleted after 10 seconds. It should be noted that the type of car(not bike) is randomly generated and the bug seems to recur and start with all cars. When the cars spawned around the player(s) hit the ground, they sometimes seem to go in an anti-gravital state, resembling something floating in space. The cars in this state tend to turn slightly at a fixed position.
We did IsNaN() checks on all the vehicles' velocities once per second and this seemed to partially work in detecting AG vehicles, but failed most of the time so we really aren't sure.
When other vehicles collide with a vehicle that is in this anti-gravital state, both vehicles are put into that state, kind of like zombie infection. Interestingly, the loose base-game static objects(like dumpsters and chairs) that can be moved by collisions with players and vehicles are also prone to the AG infection and behave similarly. If one is exposed to AG, it seems that any vehicles spawned(via buy menus) also may not move correctly with varying levels of success with different vehicles.
We put together that the bug was client-side, since if one had been exposed to car AG and went to an area where planes were spawned around the player, the planes would also exhibit this AG. BUT, if someone were to NOT be exposed to car AG and go to an area where only planes were spawned, there would be no AG. If someone who was exposed to car AG and someone who was not exposed to car AG went to the same plane-spawning zone, then one of them would experience the AG and the other would not.
Here is a video captured by one of the victims:

Pages: [1]