Giter Club home page Giter Club logo

7kaa's Introduction

PLEASE UPDATE YOUR LINKS
https://sourceforge.net/projects/skfans

Seven Kingdoms: Ancient Adversaries
-----------------------------------

Release version 2.15.6
Project website: www.7kfans.com
Downloads and source repo: sourceforge.net/projects/skfans

This is a GPL release of the Seven Kingdoms: Ancient Adversaries thanks to
Enlight Software which granted the ability to license the game under a
free and open source license in 2009. See the file "COPYING" for the
details of the license. We are indebted to Enlight for making the 7kfans
project possible and giving a new chance to build a community for fans
of the game.

Summary of changes from 2.15.5 to 2.15.6
---------
* Fixed bugs related to rebelling
* Improved AI on handling rebellions
* Fixed several crash bugs
* Fixed small graphic update bugs
* Fixed bug when assigning to ship
* Fixed AI declare war bug
* Fixed AI give tribute bug
* Greatly improved AI sea based missions
* Improved AI on training and recruiting
* Cleaned up some deinit code
* Improved handling of town migration with workers
* Improved AI to be move aggressive in attack missions
* Improved validation of attack actions
* Added display of the land mass size in the F10 menu
* Enabled town peasant migration
* Created button for markets to control stocking type -- thanks MicroVirus and
   sraboy
* Added Phoenix vision on fryhtan lairs
* Improved AI at building harbors
* Fixed bugs related to AI surrenders
* Improved locale code
* Made English the default language on Windows
* Increased the max number of raw resource sites to 10
* Fixed bug on trade ship docking and exiting
* Reduced penalty on trade unit destruction
* Improved distance calculating so placing buildings and towns on any side is
   treated the same
* Fixed some path finding issues
* Enabled the ability for AI to scout the map
* Fixed screen edge mouse handling bug
* Fixed exploit when spying on an enemy nation report
* Improved AI handling on granting money to towns and recruiting
* Increased the speed of speed level 9


System Requirements
---------

Supported operating systems
* Windows
* Linux
* MacOS

Supported architectures for multiplayer
* x86 compatible processor


Building the game
---------

The build process is based on autotools, as this easily runs on all typical
Windows, Linux and Unix-like systems with minimal requirements. Below are the
additional things that you are expected to provide in your build environment.

For building for Windows, the environment we use is mingw-w64 with a cross-
compiler under Linux. The same mingw-w64 is available from MSYS native to
Windows. There are other similar environments, but we cannot help people
configure their system -- you are expected to know how to use your tools.

Required dependencies
* GCC 4.6+ C++11 compliant compiler
* SDL 2.24.0+
* enet 1.3.xx Reliable UDP networking library
* OpenAL-soft or equivalent driver

Optional dependencies
* libcurl for full 7kfans multiplayer integration (website requires TLS1.2)
* gettext 0.19
* Game music: 7kaa-music-2.15
  -> Packagers: Copy music into program data folder or PACKAGE_DATA_DIR
  -> Make sure the file names are in upper-case
* NSIS for building a Windows installer
* TeX Live with latexmk, fontaxes, accanthis, universalis, and yfonts for
  generating the game manual in pdf

Autoconf 2.65+ and autoconf-archive is required when generating a configure
script. You do not need to generate a configure script when you are building
an officially released version of the game as it is already provided in the
source archive. Compiling and using git snapshots for general use is dis-
couraged and instead use the latest officially released version of the game.


Running locally from source build
--------

To run the game from the build directory, you need to point to the game data
folder. The game data folder is set by the environment variable SKDATA. In
a bash shell, this can be accomplished by
$ SKDATA=data src/7kaa

7kaa's People

Contributors

7k2 avatar agimenez avatar alexstreit avatar amdmi3 avatar ash74rus avatar daniel-santos avatar erik88 avatar faratheking avatar j-moravec avatar jfinkels avatar jlac1024 avatar jorgesumle avatar kdhp avatar lennyhans avatar microvirus avatar nataliefeona avatar ralflang avatar raz0rknaif avatar runtime-x86 avatar sraboy avatar stoecker avatar t0suj4 avatar the3dfxdude avatar themerion avatar tmr83 avatar unavowed avatar visel avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

7kaa's Issues

segfault when attacking a ship entering a harbor

  • os: GNU/Linux (Ubuntu 18.01)
  • version: 2.15.1
  • compiled from sources (the tarball)

I had ballistas firing on an enemy ship that were sailing back to its harbor :
7kaa-bug

It is followed by a segmentation fault. This is always reproducible. Below is the stackstrace as displayed by gdb:

Thread 1 "7kaa" received signal SIGSEGV, Segmentation fault.
Unit::attack_unit (this=0x55555662f5e0, targetRecno=<optimized out>, xOffset=0, yOffset=0, resetBlockedEdge=1) at OUNITAT2.cpp:202
202                             if(!possible_place_for_range_attack(targetXLoc, targetYLoc, unitPtr->sprite_info->loc_width, unitPtr->sprite_info->loc_height, maxRange))
(gdb) bt
#0  Unit::attack_unit (this=0x55555662f5e0, targetRecno=<optimized out>, xOffset=0, yOffset=0, resetBlockedEdge=1) at OUNITAT2.cpp:202
#1  0x000055555566652e in Unit::idle_detect_choose_target (this=0x55555662f5e0, defenseMode=<optimized out>) at OUNITI.cpp:1129
#2  0x00005555556668dd in Unit::idle_detect_attack (this=this@entry=0x55555662f5e0, startLoc=startLoc@entry=0, dimensionInput=dimensionInput@entry=0, defenseMode=defenseMode@entry=0 '\000') at OUNITI.cpp:761
#3  0x0000555555666cd5 in Unit::process_idle (this=0x55555662f5e0) at OUNITI.cpp:264
#4  0x0000555555624807 in SpriteArray::process (this=0x5555556f61e0 <unit_array>) at OSPRITEA.cpp:279
#5  0x000055555564f699 in UnitArray::process (this=<optimized out>) at OUNITA.cpp:607
#6  0x000055555562f2bd in Sys::process (this=this@entry=0x5555556fa8a0 <sys>) at OSYS2.cpp:134
#7  0x000055555562daba in Sys::main_loop (this=this@entry=0x5555556fa8a0 <sys>, isLoadedGame=isLoadedGame@entry=1) at OSYS.cpp:828
#8  0x000055555562df05 in Sys::run (this=0x5555556fa8a0 <sys>, isLoadedGame=isLoadedGame@entry=1) at OSYS.cpp:575
#9  0x000055555557d64d in Battle::run_loaded (this=<optimized out>) at OBATTLE.cpp:652
#10 0x00005555555c1bb6 in Game::single_player_menu (this=0x5555556f4b60 <game>) at OGAMMAIN.cpp:625
#11 0x00005555555c2355 in Game::run_main_menu_option (this=this@entry=0x5555556f4b60 <game>, optionId=optionId@entry=1) at OGAMMAIN.cpp:306
#12 0x00005555555c25d3 in Game::main_menu (this=0x5555556f4b60 <game>) at OGAMMAIN.cpp:256
#13 0x000055555556851d in main (argc=1, argv=0x7fffffffdcd8) at AM.cpp:360

The faulty code is below:

   │200                             maxRange = max_attack_range();                                                                                                                                                                            │
   │201                             Unit *unitPtr = unit_array[locPtr->unit_recno(targetMobileType)];                                                                                                                                         │
  >│202                             if(!possible_place_for_range_attack(targetXLoc, targetYLoc, unitPtr->sprite_info->loc_width, unitPtr->sprite_info->loc_height, maxRange))                                                                 │
   │203                             {

unitPtr is NULL, and therefore the evalulation of the parameters of function possible_place_for_range_attack yields to an invalid memory access.

Incorrect help.res Text

This may be trivial, but the Help message for REPLYDIP is incorrect.

Short text:

Reply to diplomatic message

Long text:

Click on this colored box to reply this diplomatic message.

It is incorrect in that news messages are considered a diplomatic message. For example, "An Ick Lair has been destroyed" brings up REPLYDIP text when in fact clicking on the news icon centers the screen on the location of the lair, etc.

Period Usage after %s's Kingdom%s

This may be trivial, but I consider it unsightly if not unseemly.

image

I want to remove the period after the use of a colored box at the end of a sentence.

The F11 screenshot function gives blank images

The screenshot functionality doesn't seem to be working anymore. When I take a screenshot using F11, the BMP files show up as all-white. Tested using windowed mode on Windows 10 with the latest dev version.

I have no idea since when this feature broke and if factors such as fullscreen influence it.

Please reactivate translations

Dear 7kaa developers,

Do you think it would be possible to reactivate translations to fr de and es? These were deactivated in 2015.

Cheers,
Bertrand

Mobilize worker doesn't work for enemy spies anymore

Commit a70f2f2 now explicitly prohibits players (but not AI!) from mobilising foreign workers correctly.

There is a bug in the logic now, because it refuses to mobilize a worker if it is an enemy spy (so you can also abuse the bug for spy-detection).

The logic of the change in both mobilize_worker and mobile_all_workers in confusing and prone to error, as is demonstrated by this bug.

if( remoteAction <= COMMAND_REMOTE && !workerPtr->is_nation(firm_recno, nation_recno, 1) )

if( !workerPtr->is_nation(firm_recno, nation_recno) )

We could fix the logic directly, but I'd like to see if we can't simplify things while we fix it.
So, why do we disallow mobilizing foreign workers? It's your building ... you should be able to evict anyone, foreign or own, from it. It's unclear to me why we would want to / need to restrict this, as it currently also limits the player (unnecessarily).

Cann't build `73fadc` commit.

Commit 73fadc4 fails to build:

make[2]: Leaving directory '/tmp/portage/games-strategy/7kaa-9999/work/7kaa-9999/src'
make[1]: Leaving directory '/tmp/portage/games-strategy/7kaa-9999/work/7kaa-9999/src'
Making all in po
make[1]: Entering directory '/tmp/portage/games-strategy/7kaa-9999/work/7kaa-9999/po'
make 7kaa.pot-update
make[2]: Entering directory '/tmp/portage/games-strategy/7kaa-9999/work/7kaa-9999/po'
make[2]: *** No rule to make target '../src/OGFILEA.cpp', needed by '7kaa.pot-update'.  Stop.
make[2]: Leaving directory '/tmp/portage/games-strategy/7kaa-9999/work/7kaa-9999/po'
make[1]: *** [Makefile:362: 7kaa.pot] Error 2
make[1]: Leaving directory '/tmp/portage/games-strategy/7kaa-9999/work/7kaa-9999/po'
make: *** [Makefile:447: all-recursive] Error 1

Previous commit a81b585 successfully builds.

Cann't configure 7kaa sources.

When I try to build latest commit I get error:

autoreconf-2.69: Entering directory `.'
autoreconf-2.69: running: autopoint --force
Copying file ABOUT-NLS
Copying file config.rpath
Copying file m4/codeset.m4
Copying file m4/fcntl-o.m4
Copying file m4/gettext.m4
Copying file m4/glibc2.m4
Copying file m4/glibc21.m4
Copying file m4/iconv.m4
Copying file m4/intdiv0.m4
Copying file m4/intl.m4
Copying file m4/intldir.m4
Copying file m4/intlmacosx.m4
Copying file m4/intmax.m4
Copying file m4/inttypes-pri.m4
Copying file m4/inttypes_h.m4
Copying file m4/lcmessage.m4
Copying file m4/lib-ld.m4
Copying file m4/lib-link.m4
Copying file m4/lib-prefix.m4
Copying file m4/lock.m4
Copying file m4/longlong.m4
Copying file m4/nls.m4
Copying file m4/po.m4
Copying file m4/printf-posix.m4
Copying file m4/progtest.m4
Copying file m4/size_max.m4
Copying file m4/stdint_h.m4
Copying file m4/threadlib.m4
Copying file m4/uintmax_t.m4
Copying file m4/visibility.m4
Copying file m4/wchar_t.m4
Copying file m4/wint_t.m4
Copying file m4/xsize.m4
Copying file po/Makefile.in.in
Copying file po/Makevars.template
Copying file po/Rules-quot
Copying file po/boldquot.sed
Copying file po/[email protected]
Copying file po/[email protected]
Copying file po/insert-header.sin
Copying file po/quot.sed
Copying file po/remove-potcdate.sin
autoreconf-2.69: running: aclocal --force --install -I m4
aclocal-1.15: overwriting 'm4/ax_cxx_compile_stdcxx.m4' with '/usr/share/aclocal/ax_cxx_compile_stdcxx.m4'
aclocal-1.15: overwriting 'm4/ax_cxx_compile_stdcxx_11.m4' with '/usr/share/aclocal/ax_cxx_compile_stdcxx_11.m4'
aclocal-1.15: installing 'm4/intltool.m4' from '/usr/share/aclocal/intltool.m4'
aclocal-1.15: installing 'm4/pkg.m4' from '/usr/share/aclocal/pkg.m4'
aclocal-1.15: installing 'm4/sdl2.m4' from '/usr/share/aclocal/sdl2.m4'
aclocal-1.15: installing 'm4/ax_require_defined.m4' from '/usr/share/aclocal/ax_require_defined.m4'
aclocal-1.15: error: too many loops
aclocal-1.15: Please contact <[email protected]>.
 at /usr/share/automake-1.15/Automake/Channels.pm line 662.
	Automake::Channels::msg("automake", "", "too many loops") called at /usr/share/automake-1.15/Automake/ChannelDefs.pm line 212
	Automake::ChannelDefs::prog_error("too many loops") called at /usr/bin/aclocal-1.15 line 1188
autoreconf-2.69: aclocal failed with exit status: 255

Previous commit c327f6f builds fine (I only need to add IT_PROG_INTLTOOL into configure.ac.

Segfault when starting tutorial if resource/tut_list.txt has Unix-like line endings

Hi there,

I packaged 7kaa 2.14.5 for my distro locally (I maintain the 7kaa package for Mageia), but I'm getting a segfault when trying to play the tutorial.

Here is the gdb backtrace (I did not install all relevant debug symbols, but the backtrace looks quite good already):

Program received signal SIGSEGV, Segmentation fault.
0x0000000000486cb1 in NationBase::king_name(int) ()
(gdb) bt
#0  0x0000000000486cb1 in NationBase::king_name(int) ()
#1  0x00000000004631b8 in GameFile::write_game_header(File*) ()
#2  0x00000000004632ff in GameFile::save_game(char const*) ()
#3  0x0000000000477eed in GameFileArray::save_new_game(char const*) ()
#4  0x00000000004066a7 in extra_error_handler() ()
#5  0x000000000052f93e in Error::run(char const*, ...) ()
#6  0x000000000053260b in File::file_open(char const*, int, int) ()
#7  0x0000000000421f90 in FileTxt::FileTxt(char*) ()
#8  0x00000000004d66ee in Tutor::get_intro(int) ()
#9  0x00000000004d762d in Tutor::select_tutor(int) ()
#10 0x00000000004d69d9 in Tutor::select_run_tutor(int) ()
#11 0x0000000000457594 in Game::single_player_menu() ()
#12 0x0000000000457f3d in Game::run_main_menu_option(int) ()
#13 0x00000000004583a5 in Game::main_menu() ()
#14 0x0000000000404daf in main ()

I'm using the 2.14.5 source tarball, plus a8eaf0d to fix compile issues with -Werror=format-security.

Different savefiles error

Both machines have Windows 10 Version 1607 (OS build 14393.693)
(One is Pro, the second one is Home)
Whenever we play, then save and try to load the multiplayer game, the following message is displayed:
"You cannot join the game because the multiplayer saved game you selected is different from those of other human players".

Dates on savefiles are the same. We are now in different timezones, but we tried to change the system time, which was of no use.

Can anyone confirm? I don't quite understand the cause from the sources I've found.

Soldiers defending their fort don't have the leaderiship bonus of their leader

When a fort's sortie option is turned on, when an enemy attacks the fort, soldiers leave it and defend it, but their leadership bonus is not applied. I consider this a bug that sort of makes the sortie option unusable and has been spoiling the game forever. I would say that, in this case, the soldiers should get a bonus as long as they stand in range of their leader (the fort where he is) as they would normally do.

Spy Revealing Bug (SPOILER)

The following bug report is a game play spoiler. If you don't know what this is, then you might want to stop here. If you do know what this is, please continue.


When a spy switches colors, and cloaked to an enemy nation, its reported loyalty and target loyalty is fixed between 70 and 90. If a player clicks on such unit, seeing that it switched colors, and looks at the loyalty, it will know that it is a spy because non-spies do not have a fixed loyalty ever.

This is caused by this piece of code in Unit::update_loyalty()

   if( spy_recno )      // a spy's loyalty is always >= 70
   {
      if( loyalty < 70 )
         loyalty = 70+misc.random(20);    // initialize it to be a number between 70 and 90

      target_loyalty = loyalty;
      return;
   }

The recommendation is to remove it, for two reasons.

  1. It is quite detrimental to gameplay, since spies are now so predictable, that they are useless against a human player if they are caught initially mobile.
  2. 7K2 also removed the offending code.

Noun and Adjective Mix-up in ru.po

I had a bit of trouble translating something, so these lines might need to be changed:

// TRANSLATORS: Part of "Duration of War Status"
N_("War"),
// TRANSLATORS: Part of "Duration of Tense Status"
N_("Tense"),
// TRANSLATORS: Part of "Duration of Neutral Status"
N_("Neutral"),
// TRANSLATORS: Part of "Duration of Friendly Status"
N_("Friendly"),
// TRANSLATORS: Part of "Duration of Alliance Status"
N_("Alliance")

From ONATIONB.cpp 55 - 64.

In "Duration of Neutral Status," neutral is an adjective, but when displayed as,

Status

Neutral
Neutral
Etc.

they would be considered nouns.

In Russian, one is an adjective, and the other is a noun.

Статус: нейтрален
Нейтральный статус

Segmentation Fault in the OpenALAudio Destructor on FreeBSD

Assumptions about destructor ordering cause a conflict between this and OpenAL-Soft on FreeBSD, and possibly other platforms.

The OpenALAudio destructor can conflict with OpenAL-Soft's destructor causing a Segmentation Fault, or a failed assert (depending on the library version), at exit. This happens when the OpenALAudio destructor is run after OpenAL-Soft's and attempts to call into the library; which attempts to access destroyed internal state causing the program to exit abnormally.

Standard Error (openal-soft-1.16.0)

lib: (EE) alc_cleanup: 1 device not closed
Segmentation fault

Increasing the map size

Has anyone ever experimented with this feature?

I'm trying to change the values in OWORLDMT.h and OWORLD.cpp (max_x_loc, max_y_loc) but either I break the minimap (it overflows the minimap container) or it segfaults when I launch a new game. Tips on how to do this?

Install locally in linux

Hi, I just found out about this game and I wanted to try it.
I download the files on my Ubuntu and run:

  • ./autogen.sh
  • ./configure
  • make

My problem is that if I run make install it want to install globally and I want it to be only for my user. How can I achieve that?
Thanks in advance.

Click Select in Training

I encountered an odd issue I wanted to document before I forgot... haven't been able to run this down yet.

When using the training/tutor mode, click "Next Training" and when the in game menu comes up, you'll notice the mouse is dragging the yellow drag-select-rectangle around the screen.

Arabic lang

Hello i was playing this game for a while and have been asking can this game support arabic lang?
if its support It i will start working on adding arabic file

Certain sound effects aren't working

I noticed in the current developer version that certain sound effects, like the catapult and unicorn projectiles, aren't working anymore.
My guess is it has to do with the resource files somehow.

Update: forum report on Norman sword sound also not working for 2.14.7.

War Factory: Clicking on number button in build menu leaves menu.

Context: In a War Factory, clicking the build button brings you to a menu with these buttons:
image
There are two buttons shown: the number button, and the bigger button which contains the number button. Clicking on the bigger button queues one catapult and kicks you out to the previous menu.

Expected: Clicking on the number button queues one catapult, but leaves you in the build menu.

Bug: Clicking on the number button counts as clicking on both buttons: two catapults are queued (one per button), and you're kicked out.

Right-clicking the number button also counts as two clicks.

It also happens with Harbors, but not when training Villagers. (Also, I'm unable to unqueue boat-building in Harbors using right-click, but that's a separate issue.)


I'm surprised it hasn't been noticed, since I see war machines in many strats. Could it be just on my computer?

Version 2.15.1 (latest release).

7kaa Version 2.14.5 bufferoverflow and others

I'm Maintainer for openSUSE for Seven Kingdoms and music

https://build.opensuse.org/package/show/games/7kaa

https://build.opensuse.org/package/show/games/7kaa-music

I try to update Seven Kingdoms: Ancient Adversaries to 2.14.5 but get these build failures

[  129s] Preparing packages...
[  129s] 7kaa-2.14.5-0.x86_64
[  132s] ... running 01-check-debuginfo
[  132s] ... testing for empty debuginfo packages
[  132s] ... running 02-check-gcc-output
[  132s] ... testing for serious compiler warnings
[  132s]     (using /usr/lib/build/checks-data/check_gcc_output)
[  132s]     (using /var/tmp/build-root/openSUSE_Factory-x86_64/.build.log)
[  132s] 
[  132s] I: A function overflows or underflows an array access. This could be a real error,
[  132s]    but occasionaly this condition is also misdetected due to loop unrolling or strange pointer
[  132s]    handling. So this is warning only, please review.
[  132s] W: 7kaa arraysubscript OF_MARK.cpp:817
[  132s] 
[  132s] I: Program causes undefined operation
[  132s]    (likely same variable used twiceand post/pre incremented in the same expression).
[  132s]    e.g. x = x++; Split it in two operations.
[  132s] W: 7kaa sequence-point OVOLUME.cpp:73
[  132s] 
[  132s] I: Program is likely to break with new gcc. Try -fno-strict-aliasing.
[  132s] W: 7kaa strict-aliasing-punning OERRCTRL.cpp:286, 327, 357, 397, 483
[  132s] W: 7kaa strict-aliasing-punning OMP_CRC.cpp:98, 121, 164, 196, 219, 242, 265, 310, 343, 376, 399, 437, 460, 486, 525, 548, 571, 604, 636, 672, 707, 739, 762, 788, 811, 835, 856, 877
[  132s] W: 7kaa strict-aliasing-punning OREMOTE2.cpp:333, 367, 444, 460
[  132s] W: 7kaa strict-aliasing-punning OREMOTEM.cpp:345, 383, 480, 1760, 1762, 2701
[  132s] W: 7kaa strict-aliasing-punning OSYS.cpp:2450
[  132s] W: 7kaa strict-aliasing-punning OUNITI.cpp:200
[  132s] 
[  132s] I: Statement is overflowing a buffer
[  132s] E: 7kaa bufferoverflow /usr/include/bits/stdio2.h:65

Please correct this.

Which license is for 7kaa-music, look similar than MIT or BSD but is not same.

I have used in openSUSE, but this is not good

License:        SUSE-Freeware

http://choosealicense.com/

Please use one from

https://spdx.org/licenses/

http://license.opensuse.org/

Unit and Race Names Need to be Seperate

I see RACE.dbf and UNIT.dbf are grouped as one for translation. In Russian, noun and adjectives describing a nationality are different. For example: American and American is американский and американец in Russian.

Prevent New Kingdoms From Surrendering Too Early/Often

Feature Request to Disable: https://www.7kfans.com/forums/viewtopic.php?f=6&t=621
Possible Bug: https://www.7kfans.com/forums/viewtopic.php?f=17&t=348&p=3303
Related issue in 7K2: https://www.7kfans.com/forums/viewtopic.php?f=21&t=451

There are a lot of ideas about how to resolve this. No bug has been 100% verified. Some of the ideas on resolving this:

  • Disable surrendering/buy-outs entirely
  • Adjust buy-out settings re: difficulty forum post
  • Prevent surrendering by nations <2yrs old (see PR #30)

Mobilized workers as a fighting force can unpreventably crash another nation's reputation

https://www.7kfans.com/forums/viewtopic.php?f=17&t=898

Reported by Loki

I played a long game one time, and the remaining kingdom was massive and lived on an island. I didn't want to take the time to defeat them with my military, so I trained a bunch of researchers and sent them to attack the other kingdom. They killed all the researchers, but their reputation dropped to -100, and everyone rebelled. They completely collapsed.


the3dfxdude's note: This is likely a problem with all mobile civilians--it is just much easier with workers.

It's impossible to assassinate an enemy king

If a player has placed a spy in a fort where an enemy king resides, the option is revealed to assassinate the king. However, even if the spy has the maximum skill, the assassination will always fail and result in the execution of the spy.

  • In this save game I've placed a 100 skill spy with an enemy king in a fort without additional units: VENU_005.SAV.zip

The assassination success seems to be calculated in OSPY.cpp in Spy::get_assassinate_rating. If the target unit has the rank of a king, the defending side gets +50 in defending. Maybe this value is too high. I've never been able to assassinate a king despite having tried many times.

Date Display in ru.po

In Russian, the date is displayed differently than Month Day, Year

It should be Day Month, Year

I would change it myself, but I do not know about "%s %d, %d"

Crash in multiplayer setup OSYS.cpp:1097

I compiled master 2ba326f (./configure; make;) today and I am trying to play a multiplayer game. The multiplayer lobby works well the games connect but both clients crash when the game is started. I got out gdb and found the segfault to be on https://github.com/the3dfxdude/7kaa/blob/master/src/client/OSYS.cpp#L1097 for the machine hosting the game. The this pointer is null. The machine that is not hosting the game gets a similar segfault where the this pointer is null here https://github.com/the3dfxdude/7kaa/blob/master/src/client/OSYS.cpp#L1182 Looks like the Sys object is being freed too early or something. At that point I was at a loss as to how to fix it. Any direction would be nice.

I compiled the game in debug mode and cannot reproduce the error. Makes sense because this is debug related code. For now I am just playing with debug mode and its working so far.

Both hosts are Linux 64bit. Let me know if you need more info.

Code Documentation

Moving the discussion started in PR#62 to its own issue.

In general, the code documentation is a bit inconsistent and is very minimal. There is a wiki but it's not terribly complete. As the code is adjusted and features added, it would be nice to have things well-documented in a user-friendly way.

Moving to a new style could be done piecemeal, where code is simply documented as it's worked on or just as the occasional side-project. @the3dfxdude mentioned SDL's documentation as a good example and I agree. I like that the code has some amount of documentation but isn't littered with long paragraphs; more complex documentation is in the wiki and wiki just links back to each file. Since 7KAA isn't a library, I don't think it even needs to be as comprehensive as SDL's docs but the style is nice.

SDL uses doxygen to generate documentation from the code (here's an old mailing list thread on it) but also has a wiki. I'm not sure if they ever did do any automated pull from doxygen to the wiki but we don't necessarily need that either. Doxygen can generate Markdown which means it could just be copy/pasted into the 7kfans.com wiki as time goes on while still being browseable/searchable text files on GitHub (either in source or automatically moved to the repo's wiki). This would require manual updates if things are changed but it is also pretty simple with minimal overhead.

For reference, here's an example of Doxygen documentation style for C++ and, for the (unsupported) VS users, this blog post covers integration of Doxygen with VS.

Most of the code isn't terribly difficult to understand so maybe we do nothing new with the source and just take care of the wiki. I just figured a discussion would be useful.

7kaa 2.14.7 fails to build on ARM (narrowing conversion of '-1' from 'int' to 'char' inside { })

7kaa 2.14.7 fails to build on Mageia's ARM nodes (armv5tl and armv7hl) with:

make[2]: Entering directory '/home/iurt/rpmbuild/BUILD/7kaa-2.14.7/src'
  CXX      OGAMMAIN.o
OGAMMAIN.cpp: In member function 'void Game::multi_player_menu(int, char*)':
OGAMMAIN.cpp:682:2: error: narrowing conversion of '-1' from 'int' to 'char' inside { } [-Wnarrowing]
  };
  ^
OGAMMAIN.cpp:682:2: error: narrowing conversion of '-1' from 'int' to 'char' inside { } [-Wnarrowing]
Makefile:944: recipe for target 'OGAMMAIN.o' failed

Based on this StackOverflow question this kind of narrowing conversion seems to be implementation defined, and apparently raises an error for GCC 5.4.1 on ARM.

There are various occurences of narrowing conversion, I "fixed" them by changing to signed char, and it built fine, but I don't know if that's the correct solution: http://svnweb.mageia.org/packages/cauldron/7kaa/current/SOURCES/7kaa-2.14.7-narrowing.patch?view=markup&pathrev=1106869

If you consider it good, I can make a PR with this patch.

Please use standard libuuid

Dear 7kaa developpers,

I am currently one the maintainers of the 7kaa Debian package. I was wondering whether it is really necessary to copy the external code of libuuid from e2fsprogs. And is it necessary to rename uuid_t to a custom name ?

It would be great if you could use the standard libuuid instead of copying and modifying your own version. Please see [1] about why it is always better not to ship third party code. For instance, e2fsprogs v1.43.3 is now out, but you based your fork of libuuid on v1.43.1.

If you must include the libuuid code in your source tarball, please provide a way not to use it at compile time and instead use the system libuuid library.

Best regards,
Bertrand Marc

[1] https://wiki.debian.org/UpstreamGuide#No_inclusion_of_third_party_code

Game crash with russian locale

Crash if in system russian (or any non latin) locale:
$ locale
LANG=ru_RU.UTF-8
$ /usr/local/bin/7kaa
*** buffer overflow detected ***: /usr/local/bin/7kaa terminated

GDB:
Program received signal SIGABRT, Aborted.
0xb7a23a50 in raise () from /lib/libc.so.6
(gdb) bt
#0 0xb7a23a50 in raise () from /lib/libc.so.6
#1 0xb7a24ef7 in abort () from /lib/libc.so.6
#2 0xb7a5e8e4 in ?? () from /lib/libc.so.6
#3 0xb7ad9a12 in __fortify_fail () from /lib/libc.so.6
#4 0xb7ad7c48 in __chk_fail () from /lib/libc.so.6
#5 0xb7ad723f in __strcpy_chk () from /lib/libc.so.6
#6 0x08068c65 in strcpy (__src=, __dest=0x820171c <config+60> "") at /usr/include/bits/string3.h:110
#7 Config::default_local_game_setting (this=0x82016e0 ) at OCONFIG.cpp:152
#8 0x08069539 in Config::init (this=0x82016e0 ) at OCONFIG.cpp:61
#9 0x0804be1a in main (argc=1, argv=0xbffff7d4) at AM.cpp:314

Crash on code: strcpy(player_name, _("New Player"));
"New player" translated as "Новый Игрок" (11 symbols its size 22 in UTF8 locale, but for "player_name" reserved size 20 bytes)

Cannot compile 7kaa.

When I try to compile he game I get error:

  CXX      multiplayer.o
multiplayer.cpp: In member function ‘char* MultiPlayer::receive(uint32_t*, uint32_t*, int*)’:
multiplayer.cpp:753:3: error: ‘ENetHost’ has no member named ‘connectedPeers’
multiplayer.cpp:765:3: error: ‘ENetHost’ has no member named ‘connectedPeers’
make[3]: *** [multiplayer.o] Error 1

Enet version: 1.3.7
Rev: 27a253e
OS: Gentoo Linux AMD64

Spy on Fryhtan Lairs

It would be nice to have a way to spy on fryhtan lairs like we do on others' buildings. A couple options for implementation:

  • Only as a cheat feature
  • Use the phoenix (limits it to Greek Seat of Power only, and later in game)

OP: https://www.7kfans.com/forums/viewtopic.php?f=17&t=741

See the thread for some discussion but, in general, it would require dynamically generating the "soldiers" when the lair is viewed. This is because only fryhtan leadership is pre-decided and the number of soldiers is simply based on how many soldiers each leader can command.

SDL2 Fullscreen/Window size bug

Description: After exiting fullscreen, the window size is changed.
Observed on: Windows 7 (64 bits)
Type: SDL2 bug, see Bug 2067 - Window size limit calculation issue when exiting fullscreen on Windows
Solution: We'll wait for SDL to fix this in a future update. Should we release a new 7kaa version before this, then we need to apply a work-around.
Workaround: Call SDL_SetWindowSize after going out of fullscreen. The patchfile was sent over the mailinglist, and can be downloaded from http://sourceforge.net/p/skfans/mailman/attachment/BLU175-W99C3AB51F4A417FD57F4F9BF30%40phx.gbl/2/

No mouse acceleration in fullscreen (linux)

Hi, yesterday I made a trunk build (82d81ed) and played a bit. I noticed that the mouse was not accelerated as it is in X11/xfce. My native resolution is 1920x1080, compositing is disabled, framerates and game speed was good. Switching the X11 resolution down to 800x600 before starting the game did not help either. This was pretty annoying as I normally have high accel and only move the mouse a few centimeters on the pad. In 7kaa fullscreen I had to cross the full mousepad to cross the screen. I noticed there are a few commits recently that fumbled with sdl mouse input handling.

Too high resolution for mac os

When I run game SKDATA=data ./src/7kaa it will run with sort of enabled scaling, so I can see only 1/4 of screen. Any args how to disable scaling on hiDPI displays?

Simplify Directory Structure

The directory structure is broken down into too many sections, and things still feel out of place, and makes it hard to search across all the directories. This is a proposal to merge the files of most directories in src/ back into src/. Here is the plan:

Moves

audio/openal/ -> openal/
client/* -> .
common/* -> .
file/* -> .
input/sdl/* -> .
multiplayer/common/multiplayer.cpp -> enet/multiplayer.cpp
multiplayer/common/(remaining) -> .
video/sdl/* -> .
video/common/* -> .

Deletes

input/none/
video/none/

Rationale

SDL became a hard requirement after the removal of DirectX. There is no reason to swap it out anymore, and it has plenty of good portable bits that go beyond video/input. The video bits are hard to separate from the code at this time. The input bits are hard to separate from SDL. So all of it really should just remain with the core game code for the time being.

Multiplayer and audio remain a small section of easily identifiable code. They could be replaced again if needed. They can be put in separate directories just in case.

We can structure related classes into their own directories later, but it is unlikely anything will get that much attention.

The plan is to get the done first for 2.14.7.

"New villages emerge" option doesn't work

How to reproduce:

  • Start a new game with "New villages emerge" option set to "no" and "Independent villages" set to "few".
  • You start with 7 independent villages.
  • Set speed to high.
  • New villages spawn until there are 10 villages on the map.

Expected behavior:

  • New independent villages should not spawn when "New villages emerge" is set to "no".

When villages are captured new villages keep spawning so that the total amount is about 10 independent villages at all times. This makes it impossible to run out of independent villages.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.