28 Days - native gamemode - download available/project closed

Users who are viewing this thread

LIVC6gV.png

This project is closed (meaning that I no longer host the server). You can host one yourself. Tutorial + files in the bottom of this post.

Q: What is 28 days?
A: 28 days is a sequel to 27 days mod. It is a serverside mod which introduces invasion mod over native. Your goal is to survive 28 waves of enemies.

Q: What do I need to play it?
A: You need to open the game in native mod and then hop inside a server that runs this gamemode.

Q: More details about this gamemode?
A: There are 2 teams: the first team is the survivors team and the second team is the invasion team. You, as a player, can only choose the first team. After choosing the team you need to choose one of three classes: archer, infantry or crossbowman. When you first enter the server, you will have level 1. As you kill enemies, you gain XP and Gold. The XP is only used to level up. With gold you can purchase upgrades or weapons. All stats are persistent meaning that if you leave the server, your level and xp and all stats will be saved in a database. Every 3 waves there is a boss wave (so waves 3, 6, 9 and so on are boss waves). Bosses are extremely tough. The last wave is also a special wave.

Q: How do I choose the class?
A: After choosing the team, you will be asked to choose a troop. If you want to play as an archer, you need to pick the top most troop (crossbowman troop or archer). If you want to play as infantry, you need to pick the middle troop. If you want to play as crossbowman, you need to pick the bottom most troop (horseman troop).

Q: How do I choose my weapons?
A: You don't. Each equipment piece has it's own level that can be upgraded. Higher level = better equipment. You can upgrade your equipment at the boxes with armor/weapons on top of them.
XyYdwt6.png
fLzwEB7.png
eSJhaYJ.png

Q: Can I get other weapons other than the spawn ones?
A: Yes, you can buy them at the random weapon boxes. There are 4 different types of random boxes, all of them have a question mark on top of them: random melee weapon, random ranged weapon (includes bows, xbows, throwing stuffs), random shield and random food. You can differentiate the boxes by looking at the item next to the question mark. If it is a shield, it is a random shield; if it is a melee weapon, it's a random melee box; if it is a bow/javelin, random ranged; if it is a bread, it is random food.
OBqGgTx.png
Xqz0MVp.png
J5ElrIJ.png
zUqSSrC.png

Q: What happens if I die?
A: If the entire team dies, you lose. You will respawn after a boss wave.

Q: How do I heal?
A: You can heal by buying food from a random food box (you need to pick up the food to heal you). Food heals 50% hp. Also, after each wave, all players are healed 50% hp.

Q: Can I refill my ammo?
A: Yes, you can. Use a ammo refill box (it is a box with arrows on top of it (note! the box near the armor is for upgrading the arrows level for archer; ammo refill box contains multiple arrows on top of it))
I7bBZTL.png

Q: What is the gold for?
A: Pretty much for buying upgrades and items at the boxes.

Q: How do I get gold/xp?
A: You get them by killing enemies. Bosses gives you 15 xp/5 gold, minions gives 5 xp/2 gold and normal enemies gives 1 xp and 1 gold.

Q: What are the prices for upgrades/buying weapons?
A: Each upgrade costs 50 (for players under level 10, they cost 12). Each random weapon box costs 1 gold. Random shield box costs 3 gold. Food box costs 0 (it's free). Ammo refill costs 1. Placing a barricade costs 5 gold.

Q: How can I place barricades?
A: You need a barricading hammer. You can buy one at a barricading hammer box. It costs 3 gold. To place them, simply attack with the hammer and a barricade will spawn in front of you. Note that placing a barricade costs 5 gold.
EqFyerG.png

Q: How do I know which is the current wave?
A: First team score represents the current wave number, second team score represents how many waves are left until boss wave.

Q: How can I find my stats?
A: Press escape -> show game rules and in chat your stats should appear.

Q: Server details?
A: Sure!
    Name: 28Days_Invasion
    Slots: 16
    Hosted in Europe, in France.

Note 1: The server is currently in it's first release, so lots of bugs can occur.
Note 2: Lots of stuffs will be tweaked like prices and enemies difficulty.
Note 3: Please report all bugs that you find.
Note 4: If you have a suggestion, put it here.

  • V1.0
  - initial release
  • V1.1
  - added admin chat
  - added capability for bots to attack barricades
  - added stats listing by pressing 'show game rules' button
  - changed most prices
  - changed bots power (made them easier to kill)
  - changed barricading placement
  - fixed food not healing bug
  - fixed map bug (added missing AI mesh)
  - removed leftover message from testing
  - removed horses from invaders

  • V1.2
  - added bosses abilities
  - added players health, damage and speed modifiers (the higher the level, the better)
  - added 2 more bosses (so now Quick Jimmy doesn't come 3 times in a row)
  - changed waiting time between waves from 30 seconds to 15 seconds
  - changed Ruins map AI mesh (there are no 'blind' spots for bots)
  - changed bosses and minion's health (300% / 150%)
  - changed the last wave so it now contains all bosses + 5 kings

  • V1.3
  - added new map (made by Cavetroll)
  - changed minions powers (made them easier)
  - fixed ammo refill
  - fixed message 'You won this wave' when a player dies in between waves

  • V1.4
  - removed all horses
  - changed some bosses abilities
  - changed player modifiers
  - added some admin commands

  • V1.5
  - changed prices (food costs 0, ammo costs 1, barricade costs 5, random melee and ranged costs 1)
  - changed hp system so now the health bar doesn't get out of the screen (you still have the same amount of hp)
  - added xp bonus at boss wave and at final wave ( you need to have some kills in order to receive the bonus)

  • V1.6
  - fixed food picking up
  - fixed health bar problems

If you want to know how to make a map for this gamemode, you will need to know the following:
1. Spawn point 0 is for players spawning
2. Spawn points 2 to 9 (including 2 and 9) are for invaders
3. To make a functionally box you need to spawn in a box_a scene prop, then spawn a castle_f_door_b. Now scale the door to 0.35; 1.00; 0.30 . Then rotate the door so the Y axis faces upwards. Then position the door inside the box so that it is near the top of the box.
4. Variation ids for the doors are as follows:
    First variation id:
    - 0 - normal door
    - 1 - spawns an item
    - 2 - ammo refill
    - 3 - upgrade armor
    For spawning item, the variation id 2 is:
    - 0 - random melee item
    - 1 - random shield
    - 2 - random throw item
    - 3 - barricading hammer
    - 4 - random food
    For armor upgrade, the variation id 2 is:
    - 1 - bow
    - 2 - arrows
    - 3 - one handed weapon
    - 4 - two handed weapon
    - 5 - shield
    - 6 - head armor
    - 7 - body armor
    - 8 - foot armor
    - 9 - glove armor
    - 10 - crossbow
    - 11 - bolts
5. AI mesh!!!! It is very very important to make the AI mesh correctly. Make sure that it covers every part where players can walk.

Logo made by Efe Karacar (aka Belendor)


Here are the files. http://www.mediafire.com/download/62klw6mkefjl02p/28_days_release_files.7z

How to install:
1. Get a webserver host that supports php and sql database (for local hosting you can use usbwebserver or xampp). Here is a free hosting one http://www.freewebhostingarea.com/ .
2. Note down the database host address, database username, database password and the database name (you get them from the hosting website). Then open up webserver/28days.php (from the zip file) using notepad (or whatever). Now edit the 4 variables (database_host, database_username and the others) so that they contain the ones that you note down.
3. Look on line 19: 'if($_GET['pass'] == "password")'. Replace the string 'password' with whatever you want. Note down this string because we will use it later.
4. Put 28days.php into the root folder of the webserver (using filezilla or another ftp program).
5. Using phpmyadmin (or whatever), import the database structure from 'sql_database_structure/28_days_database_structure.sql'. You now should have the structure of the database (the table 'players').
6. You need to install module system in order to recompile the mod. (Read this on how to install it)
7. Open up module_system folder. Create a folder called 'output'. Then open up module_info.py . Set the export dir to "output/".
8. Now open module_scrips and search for 'get_webserver_ip' .
  ("get_webserver_ip",[
    (str_store_string, s0, "@google.com"),
  ]),
  ("get_webserver_pass",[
    (str_store_string, s1, "@password"),
  ]),
9. Now replace 'password' with the string that you choose at step 3.
10. Replace 'google.com' with your webserver's host address or ip (if you are hosting this locally, the ip is 127.0.0.1). The host address is the name of the domain that you registered (aka your website address ). Make sure that you do NOT put http:// .
11. After saving the file, double click on build_module.bat . It should say some 'exporting ***...' and some warnings like 'unused local variable' (or something like that).
12. Make a copy of native folder. Then copy the files from the 'output' folder and paste them inside the copy of the native. Overwrite all.
13. Open 'scene_obj' folder (that was inside the zip file) and copy all files (should be 2). Then go into the copy of the native folder, then into 'SceneObj' folder and paste them there. Overwrite all.
14. Now go into the dedicated server folder. Go into 'modules' and delete the folder 'Native'. Now rename that copy of native to 'Native' and put it inside 'modules' folder.
15. Go into dedicated server's main folder and create a file called 28days.txt. Open it and paste what is inside the spoiler below
#WARNING: Make sure that you change the capital values with proper ones.
#uncomment the line below when you set a valid administrator password
set_pass_admin admin_pass
#if you have premium members, set a password for them, otherwise delete/comment out the line below
#uncomment the line below when you set a valid private password
#set_pass 1545254254
#uncomment the line below when you set a valid server name
set_server_name 28Days_Invasion
#uncomment the line below when you set a valid welcome message
#set_welcome_message WELCOME MESSAGE
#Steam must be running in order to use valve anti cheat
#Also you must use the Steam version of the dedicated server in order to use this option
set_enable_valve_anti_cheat 1
set_add_to_game_servers_list 1
#setting deathmatch (multiplayer_dm) mode
set_mission multiplayer_bt
#setting max players, first one is non-premium member limit, second one is premium member limit
set_max_players 32 32
#set_num_bots_voteable 20

set_map multi_scene_2
add_map multi_scene_1
#add_map multi_scene_4
#add_map multi_scene_7
#add_map multi_scene_9
#add_map multi_scene_11

set_ban_voteable 0
set_factions_voteable 0
set_maps_voteable 0
set_kick_voteable 1
set_num_bots_voteable 0

set_auto_team_balance_limit 7
set_control_block_direction 1

#adding all kingdoms to both sides just to randomize all of them
#adding less kingdoms will reduce the randomization set (used in set_randomize_factions command)
#add_factions fac_kingdom_1 fac_kingdom_1
#add_factions fac_kingdom_2 fac_kingdom_2
#add_factions fac_kingdom_3 fac_kingdom_3
add_factions fac_kingdom_4 fac_kingdom_4
#add_factions fac_kingdom_5 fac_kingdom_5
#add_factions fac_kingdom_6 fac_kingdom_6
#set_randomize_factions 1
#if the bottleneck is your server's bandwidth, then make sure that you set a correct value for upload limit
set_upload_limit 100000000
#if you are running more than one dedicated server on the same computer, you must give different ports to each of them
set_port 7240
#if you are running the Steam version of the dedicated server, this port must also be set, and same limitations of set_port apply for Steam port
set_steam_port 7241
set_server_log_folder Logs
set_server_ban_list_file Logs\ban_list.txt
start
16. Edit the file as you want (add admin password, change server name, whatever).
17. Create a file called 'start_28days.bat'. Open it with notepad and put this inside: 'start mb_warband_dedicated.exe -r 28days.txt -m Native'.
18. Start the server using 'start_28days.bat'.
19. Done
20. ????
21. Profit!


Credits and stuffs that you should know before/after modifying the code:
The code is OSP, meaning that you can edit the code or use the code (or part of the code) in other projects, with the following conditions:
1. You will give proper credits
2. In case you modify the gamemode, don't delete the 'developer has joined the game' message (and don't modify the uid for that message)
 
I've pushed an update. Here's the changelog:
  - added admin chat
  - added capability for bots to attack barricades
  - added stats listing by pressing 'show game rules' button
  - changed most prices
  - changed bots power (made them easier to kill)
  - changed barricading placement
  - fixed food not healing bug
  - fixed map bug (added missing AI mesh)
  - removed leftover message from testing
  - removed horses from invaders


trot888 said:
It's true QQ, also we don't actually know what happened, our characters just started to do roll-backs QQ
I don't know what happened. I've added some thing in the new update that I think could be the cause... do you run anything on top of native? Neogk or something else? Did any unusual message appeared in game?
 
Back
Top Bottom