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: https://t.co/4A50m6IKen

4 weeks ago

June 23, 2017, 10:44:16 pm
  • [Release] FC Script Pack 2 3
Currently:  

Author Topic: [Release] FC Script Pack  (Read 3184 times)

Dev_34

  • Full Member
  • ***
  • Posts: 150
    • View Profile
[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: https://www.jc-mp.com/forums/index.php/topic,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.


Lord_Farquaad

  • Full Member
  • ***
  • Posts: 213
    • View Profile
Re: [Release] FC Script Pack
« Reply #1 on: April 10, 2016, 08:59:10 am »
       

As stated above and in various readmes within the pack, if you have any questions, please don't hesitate to ask us.  We are open to making more tutorials on editing and using specific modules if there is a need.  There are a few tutorials in this pack detailing how to use a few modules already.
« Last Edit: April 10, 2016, 09:01:53 am by Lord_Farquaad »

HoodDestroyer

  • Newbie
  • *
  • Posts: 29
    • View Profile
Re: [Release] FC Script Pack
« Reply #2 on: April 10, 2016, 09:25:33 am »
This is such an amazing gamemode, thx for releasing it!!!
question : Are we allowed to get some of the scripts from the pack and implement it to my own pack?

Dev_34

  • Full Member
  • ***
  • Posts: 150
    • View Profile
Re: [Release] FC Script Pack
« Reply #3 on: April 10, 2016, 09:35:43 am »
This is such an amazing gamemode, thx for releasing it!!!
question : Are we allowed to get some of the scripts from the pack and implement it to my own pack?

Thanks!
And to answer your question: yes, absolutely.

We only ask that anyone planning to publicly re-release the code give the FC team credit, subject to a degree of discretion on your part.

By just adding our code to your scripts, there is no need to give us credit in any way.
« Last Edit: April 10, 2016, 05:25:47 pm by Dev_34 »

TheJayCool

  • Newbie
  • *
  • Posts: 5
    • View Profile
Re: [Release] FC Script Pack
« Reply #4 on: April 11, 2016, 06:26:26 am »
My game crashes when i join the server, everything is setup correctly.
http://pastebin.com/fm83KLHV
Is this maybe just a graphical crash? It was fine on the FC server
« Last Edit: April 11, 2016, 06:30:50 am by TheJayCool »

LordNoob

  • Sr. Member
  • ****
  • Posts: 349
    • View Profile
Re: [Release] FC Script Pack
« Reply #5 on: April 11, 2016, 04:37:13 pm »
There are only a few bugs that I know of which force a game crash. Keep trying. If it doesn't work: unload the modules, join, and then reload them. That might prevent crashes when you join?

TheJayCool

  • Newbie
  • *
  • Posts: 5
    • View Profile
Re: [Release] FC Script Pack
« Reply #6 on: April 11, 2016, 07:37:01 pm »
Unloaded everything, joined, loaded everything. Still crashes.
This appeared when i crashed:
http://pastebin.com/Rvatmcet

LordNoob

  • Sr. Member
  • ****
  • Posts: 349
    • View Profile
Re: [Release] FC Script Pack
« Reply #7 on: April 11, 2016, 08:00:12 pm »
Seems like some error with the SQL database not existing to me (especially if it works on FC). Not sure where to go from there - I'm not too experienced with SQL. Perhaps Dev or LF can weigh in.

Dev_34

  • Full Member
  • ***
  • Posts: 150
    • View Profile
Re: [Release] FC Script Pack
« Reply #8 on: April 11, 2016, 09:35:48 pm »
Unloaded everything, joined, loaded everything. Still crashes.

Well that's the problem.

Most of the SQL work to set-up someone's account is done when they first join the server.
For this to occur, the PlayerJoin event must be fired for our modules to set-up the correct records for a player; this doesn't occur when the scripts are loaded and you're in the server already.

If you join the server first and load the modules second, then once you leave it will try to update records that don't exist, as your console showed.

What you should do is clear your database (delete server.db), load up the server along with all the scripts, then join it.
« Last Edit: April 11, 2016, 09:40:10 pm by Dev_34 »

TheJayCool

  • Newbie
  • *
  • Posts: 5
    • View Profile
Re: [Release] FC Script Pack
« Reply #9 on: April 11, 2016, 09:45:54 pm »
Got it fixed, turns out all the text at noobisland made me crash. Thx
« Last Edit: April 11, 2016, 10:01:45 pm by TheJayCool »

Dev_34

  • Full Member
  • ***
  • Posts: 150
    • View Profile
Re: [Release] FC Script Pack
« Reply #10 on: April 11, 2016, 10:04:15 pm »
Got it fixed, turns out all the text at noobisland made me crash. Thx
another question: how do you change player models?

I'm not sure where in the code LF added the model override, but players can nonetheless change their model with the Plastic Surgery Kit item.

It's useful to add yourself as an admin right away (see instruction files in the Administrative Tools folder).

From there, you could add this item by just typing this in chat:
/add Plastic Surgery Kit (1)

Lord_Farquaad

  • Full Member
  • ***
  • Posts: 213
    • View Profile
Re: [Release] FC Script Pack
« Reply #11 on: April 16, 2016, 11:19:34 pm »
I'm not sure where in the code LF added the model override, but players can nonetheless change their model with the Plastic Surgery Kit item.

The code that handles the models is in scripts/social/server/sSocial.lua.

It's useful to add yourself as an admin right away (see instruction files in the Administrative Tools folder).

The instructions for adding yourself as an admin is step #2 in Setting up a server.txt.  It might be elsewhere in the pack as well, but it's at least there.

BlueHammer

  • Newbie
  • *
  • Posts: 1
    • View Profile
Re: [Release] FC Script Pack
« Reply #12 on: May 23, 2016, 08:33:17 pm »
The Server keeps crashing on me, please help ;(

Lord_Farquaad

  • Full Member
  • ***
  • Posts: 213
    • View Profile
Re: [Release] FC Script Pack
« Reply #13 on: May 25, 2016, 05:55:58 am »
Does the server specifically crash or does your game crash when you try to connect to the server?

123samson456

  • Full Member
  • ***
  • Posts: 139
    • View Profile
Re: [Release] FC Script Pack
« Reply #14 on: May 25, 2016, 08:11:42 pm »
Thanks for releasing this huge chunk of code :DD
I myself have been inactive for almost 2 years so i sadly missed the whole legacy of this server/gamemode however i wanted to pick up coding for this mod again and this will be very very helpful :)