Author Topic: Old OXCE discussion thread  (Read 344153 times)

Offline Yankes

  • Moderator
  • Commander
  • ***
  • Posts: 2401
    • View Profile
Re: [EXE] OpenXcom Extended
« Reply #630 on: December 04, 2015, 09:50:06 pm »
Another possible solution is change font to smaller one or simply allow modder to alter overall layout of page (but not adding new one).
Overall I bit ignored ufopedie, none of my changes are reflected in it.
At some point I should spend some time improving it, but right now I have other things to do.

Offline Dioxine

  • Commander
  • *****
  • Posts: 5239
  • punk not dead
    • View Profile
    • Nocturnal Productions
Re: [EXE] OpenXcom Extended
« Reply #631 on: December 04, 2015, 10:41:15 pm »
I don't care either way. And what Arthanor proposes might be actually more confusing than helpful - a normal human expects to find one info in one place, not be dazed by information that constantly jumbles around the whole page.

Offline Arthanor

  • Commander
  • *****
  • Posts: 2490
  • XCom Armoury Quartermaster
    • View Profile
Re: [EXE] OpenXcom Extended
« Reply #632 on: December 04, 2015, 10:52:17 pm »
Seemed more consistent to me (all the accuracy and TU costs in the same place, instead of melee ones tucked away in the description). That was actually the point of the suggestion. Although granted the "only show if there's place" idea is bit more confusing.

Oh well, there are indeed more important things that could be worked on. Just wanted it to be somewhere in the ToDo list ;) (or quickly done, before the space issue was pointed out).
« Last Edit: December 04, 2015, 10:54:25 pm by Arthanor »

Offline Solarius Scorch

  • Global Moderator
  • Commander
  • *****
  • Posts: 9891
  • WE MUST DISSENT
    • View Profile
    • Nocturmal Productions modding studio website
Re: [EXE] OpenXcom Extended
« Reply #633 on: December 10, 2015, 12:29:27 am »
Yankes, it may be bold of me to ask, but what is this scripting you are working on? Because it comes up pretty often from you, like "I'll add this when I get the scripting done", or "Yeah that's interesting, but right now I'm doing scripting". So I naturally got curious about this scripting thing. Is it related to the vanilla mission scripting (or even the same thing), or did you mean something else entirely?

Offline Yankes

  • Moderator
  • Commander
  • ***
  • Posts: 2401
    • View Profile
Re: [EXE] OpenXcom Extended
« Reply #634 on: December 10, 2015, 01:17:28 am »
"Turing complete" scripting e.g. you will can add any logic you want to game. Instead of adding new properties or special cases in code you could add new things using only ruleset. like "When your commander die you lose game", "Spawn unit after grenade explosion" or mix both "lose game after ANY grenade explosion" (some part of game could be reimplemented using script to allow change it by modders).

Right now I stuck on trying figure out how made it scalable, because its work from long time but would be hard to do lot of things I plan in current state.

Of course I do it in Hard way because I code all my self :). Simpler solution would be drop all my code and add some ready solution for some library.
But that would not be so fun :)

Offline Solarius Scorch

  • Global Moderator
  • Commander
  • *****
  • Posts: 9891
  • WE MUST DISSENT
    • View Profile
    • Nocturmal Productions modding studio website
Re: [EXE] OpenXcom Extended
« Reply #635 on: December 10, 2015, 01:26:03 am »
OK, I get it, hat's off, man. This is big.

So, how is it going? Can we put you under pressure now? :)

Offline Meridian

  • Global Moderator
  • Commander
  • ***
  • Posts: 6604
  • OXCE developer
    • View Profile
    • My Wiki
Re: [EXE] OpenXcom Extended
« Reply #636 on: December 11, 2015, 12:38:46 pm »
Extended version of OpenXcom
Mod version 2.5b
OpenXcom version: Nightly 2015-09-15
OpenXcom commit: 773fd047a42b1efe377fc9d56490fdeae922ffd5
Extended commit: 808f86681feed875d9e0286711ca1f0e40973135

Current working branch:
https://github.com/Yankes/OpenXcom/tree/OpenXcomExtended

Hi Yankes, I would like to compile my own version of 2.5b... which commit/branch should I use?

a/ commit 808f86681feed875d9e0286711ca1f0e40973135 ... from master branch ? from Nov 27th
b/ or latest commit (a15d6cfc1ab7f13c37043baf437f4edb398ded5f) from https://github.com/Yankes/OpenXcom/tree/OpenXcomExtended branch? from Oct 10th

EDIT: also, both of them seem to contain more than "OpenXcom version: Nightly 2015-09-15"... is there even a third option?

EDIT2: I tried the first option using the same approach as for vanilla, but I get build errors (no compilation errors though)... any idea what's wrong? (windows 7, visual studio 2010)

Code: [Select]
1>------ Build started: Project: OpenXcom, Configuration: Release Win32 ------
1>Build started 11. 12. 2015 15:08:13.
1>InitializeBuildStatus:
1>  Touching "D:\xcom-ext\OpenXcom\src\..\obj\Win32\Release\OpenXcom.unsuccessfulbuild".
1>ClCompile:
1>  All outputs are up-to-date.
1>  All outputs are up-to-date.
1>ResourceCompile:
1>  All outputs are up-to-date.
1>BasescapeState.obj : error LNK2001: unresolved external symbol "public: __thiscall OpenXcom::AllocateTrainingState::AllocateTrainingState(class OpenXcom::Base *)" (??0AllocateTrainingState@OpenXcom@@QAE@PAVBase@1@@Z)
1>AlienBAIState.obj : error LNK2001: unresolved external symbol "public: bool __thiscall OpenXcom::RuleDamageType::isDirect(void)const " (?isDirect@RuleDamageType@OpenXcom@@QBE_NXZ)
1>TileEngine.obj : error LNK2001: unresolved external symbol "public: int __thiscall OpenXcom::RuleDamageType::getRandomDamage(int)const " (?getRandomDamage@RuleDamageType@OpenXcom@@QBEHH@Z)
1>PsiTrainingState.obj : error LNK2001: unresolved external symbol "public: __thiscall OpenXcom::TrainingState::TrainingState(void)" (??0TrainingState@OpenXcom@@QAE@XZ)
1>Armor.obj : error LNK2001: unresolved external symbol "public: int __thiscall OpenXcom::RuleStatBonus::getBonus(class OpenXcom::BattleUnit const *)const " (?getBonus@RuleStatBonus@OpenXcom@@QBEHPBVBattleUnit@2@@Z)
1>Armor.obj : error LNK2001: unresolved external symbol "public: void __thiscall OpenXcom::RuleStatBonus::setStunRecovery(void)" (?setStunRecovery@RuleStatBonus@OpenXcom@@QAEXXZ)
1>Armor.obj : error LNK2001: unresolved external symbol "public: void __thiscall OpenXcom::RuleStatBonus::setEnergyRecovery(void)" (?setEnergyRecovery@RuleStatBonus@OpenXcom@@QAEXXZ)
1>Armor.obj : error LNK2001: unresolved external symbol "public: void __thiscall OpenXcom::RuleStatBonus::setTimeRecovery(void)" (?setTimeRecovery@RuleStatBonus@OpenXcom@@QAEXXZ)
1>Armor.obj : error LNK2001: unresolved external symbol "public: void __thiscall OpenXcom::RuleStatBonus::setPsiDefense(void)" (?setPsiDefense@RuleStatBonus@OpenXcom@@QAEXXZ)
1>Armor.obj : error LNK2001: unresolved external symbol "public: void __thiscall OpenXcom::RuleStatBonus::load(class YAML::Node const &)" (?load@RuleStatBonus@OpenXcom@@QAEXABVNode@YAML@@@Z)
1>Armor.obj : error LNK2001: unresolved external symbol "public: __thiscall OpenXcom::RuleStatBonus::RuleStatBonus(void)" (??0RuleStatBonus@OpenXcom@@QAE@XZ)
1>RuleItem.obj : error LNK2001: unresolved external symbol "public: void __thiscall OpenXcom::RuleStatBonus::setFlatHundred(void)" (?setFlatHundred@RuleStatBonus@OpenXcom@@QAEXXZ)
1>RuleItem.obj : error LNK2001: unresolved external symbol "public: void __thiscall OpenXcom::RuleStatBonus::setStrength(void)" (?setStrength@RuleStatBonus@OpenXcom@@QAEXXZ)
1>RuleItem.obj : error LNK2001: unresolved external symbol "public: void __thiscall OpenXcom::RuleStatBonus::setPsiAttack(void)" (?setPsiAttack@RuleStatBonus@OpenXcom@@QAEXXZ)
1>RuleItem.obj : error LNK2001: unresolved external symbol "public: void __thiscall OpenXcom::RuleStatBonus::setThrowing(void)" (?setThrowing@RuleStatBonus@OpenXcom@@QAEXXZ)
1>RuleItem.obj : error LNK2001: unresolved external symbol "public: void __thiscall OpenXcom::RuleStatBonus::setMelee(void)" (?setMelee@RuleStatBonus@OpenXcom@@QAEXXZ)
1>RuleItem.obj : error LNK2001: unresolved external symbol "public: void __thiscall OpenXcom::RuleStatBonus::setFiring(void)" (?setFiring@RuleStatBonus@OpenXcom@@QAEXXZ)
1>RuleItem.obj : error LNK2001: unresolved external symbol "public: void __thiscall OpenXcom::RuleDamageType::load(class YAML::Node const &)" (?load@RuleDamageType@OpenXcom@@QAEXABVNode@YAML@@@Z)
1>RuleItem.obj : error LNK2001: unresolved external symbol "public: __thiscall OpenXcom::RuleDamageType::RuleDamageType(void)" (??0RuleDamageType@OpenXcom@@QAE@XZ)
1>D:\xcom-ext\OpenXcom\src\..\bin\Win32\Release\OpenXcom.exe : fatal error LNK1120: 19 unresolved externals
1>
1>Build FAILED.
1>
1>Time Elapsed 00:00:26.74
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
« Last Edit: December 11, 2015, 04:12:08 pm by Meridian »

Offline Arthanor

  • Commander
  • *****
  • Posts: 2490
  • XCom Armoury Quartermaster
    • View Profile
Re: [EXE] OpenXcom Extended
« Reply #637 on: December 11, 2015, 06:29:57 pm »
Hi Meridian,

I've used commit 808f8 from Nov. 27th to compile and then run X-Piratez without issues. Did you try to add something else in there? That's usually where things go wrong..

I have a code version with "manufacturing profit/cost info" and "statistical bullet conservation" added, which works fine. Depending on which feature you are looking for, I could look into making a "custom OXCE code" and publish that on github.

Offline Yankes

  • Moderator
  • Commander
  • ***
  • Posts: 2401
    • View Profile
Re: [EXE] OpenXcom Extended
« Reply #638 on: December 11, 2015, 06:48:02 pm »
808f86 is lasted released version. In OpenXcomExtended branch is working copy of next version.
"OpenXcom version: Nightly 2015-09-15" mean what base nightly is compatible with.

For compile errors, some ".cpp" files aren't added to project files. Chack if you have added "AllocateTrainingState.cpp", "RuleDamageType.cpp" and "RuleStatBonus.cpp".

Offline Meridian

  • Global Moderator
  • Commander
  • ***
  • Posts: 6604
  • OXCE developer
    • View Profile
    • My Wiki
Re: [EXE] OpenXcom Extended
« Reply #639 on: December 11, 2015, 11:49:57 pm »
I've used commit 808f8 from Nov. 27th to compile and then run X-Piratez without issues. Did you try to add something else in there? That's usually where things go wrong..
I have a code version with "manufacturing profit/cost info" and "statistical bullet conservation" added, which works fine. Depending on which feature you are looking for, I could look into making a "custom OXCE code" and publish that on github.

No, I haven't added anything yet, just trying to compile 808f8.

After I can compile it, I will try adding the Stat Improvement screen (https://openxcom.org/forum/index.php/topic,2461.msg55882.html#msg55882), the one with empty spaces.

For compile errors, some ".cpp" files aren't added to project files. Chack if you have added "AllocateTrainingState.cpp", "RuleDamageType.cpp" and "RuleStatBonus.cpp".

Yes, the files were missing. I've added them and now I get other strange errors, attached a screenshot. Any idea? It's been a long time since I did C++ last time... :(

Offline Yankes

  • Moderator
  • Commander
  • ***
  • Posts: 2401
    • View Profile
Re: [EXE] OpenXcom Extended
« Reply #640 on: December 12, 2015, 01:55:53 am »
could you show where in OpenXcom code error is generated? type_traits is standard library and without more information I can't find cause.

Offline Meridian

  • Global Moderator
  • Commander
  • ***
  • Posts: 6604
  • OXCE developer
    • View Profile
    • My Wiki
Re: [EXE] OpenXcom Extended
« Reply #641 on: December 12, 2015, 12:23:05 pm »
Here's the entire console output:

Code: [Select]
1>------ Build started: Project: OpenXcom, Configuration: Release Win32 ------
1>Build started 12. 12. 2015 11:20:36.
1>InitializeBuildStatus:
1>  Touching "D:\xcom-ext\OpenXcom\src\..\obj\Win32\Release\OpenXcom.unsuccessfulbuild".
1>ClCompile:
1>  All outputs are up-to-date.
1>  RuleStatBonus.cpp
1>Mod\RuleStatBonus.cpp(63): warning C4244: 'return' : conversion from 'int' to 'float', possible loss of data
1>Mod\RuleStatBonus.cpp(68): warning C4244: 'return' : conversion from 'int' to 'float', possible loss of data
1>Mod\RuleStatBonus.cpp(73): warning C4244: 'return' : conversion from 'int' to 'float', possible loss of data
1>Mod\RuleStatBonus.cpp(78): warning C4244: 'return' : conversion from 'int' to 'float', possible loss of data
1>Mod\RuleStatBonus.cpp(83): warning C4244: 'return' : conversion from 'int' to 'float', possible loss of data
1>Mod\RuleStatBonus.cpp(125): warning C4244: 'return' : conversion from 'int' to 'float', possible loss of data
1>Mod\RuleStatBonus.cpp(129): warning C4244: 'return' : conversion from 'int' to 'float', possible loss of data
1>C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\type_traits(197): error C2752: 'std::tr1::_Remove_reference<_Ty>' : more than one partial specialization matches the template argument list
1>          with
1>          [
1>              _Ty=float (__cdecl &)(const OpenXcom::BattleUnit *)
1>          ]
1>          C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xtr1common(356): could be 'std::tr1::_Remove_reference<_Ty&&>'
1>          C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xtr1common(350): or       'std::tr1::_Remove_reference<_Ty&>'
1>          C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\type_traits(962) : see reference to class template instantiation 'std::tr1::remove_reference<_Ty>' being compiled
1>          with
1>          [
1>              _Ty=float (__cdecl &)(const OpenXcom::BattleUnit *)
1>          ]
1>          C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\utility(26) : see reference to class template instantiation 'std::tr1::decay<_Ty>' being compiled
1>          with
1>          [
1>              _Ty=float (__cdecl &)(const OpenXcom::BattleUnit *)
1>          ]
1>          Mod\RuleStatBonus.cpp(288) : see reference to class template instantiation 'std::tr1::_Unrefwrap<_Type>' being compiled
1>          with
1>          [
1>              _Type=float (__cdecl &)(const OpenXcom::BattleUnit *)
1>          ]
1>C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\type_traits(965): error C2528: 'abstract declarator' : pointer to reference is illegal
1>C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\type_traits(349): error C2528: 'type' : pointer to reference is illegal
1>          C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\type_traits(967) : see reference to class template instantiation 'std::tr1::add_pointer<_Ty>' being compiled
1>          with
1>          [
1>              _Ty=float (__cdecl &)(const OpenXcom::BattleUnit *)
1>          ]
1>Mod\RuleStatBonus.cpp(382): warning C4244: 'return' : conversion from 'float' to 'int', possible loss of data
1>Mod\RuleStatBonus.cpp(384): warning C4244: 'return' : conversion from 'float' to 'int', possible loss of data
1>
1>Build FAILED.
1>
1>Time Elapsed 00:00:16.06
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

Offline Yankes

  • Moderator
  • Commander
  • ***
  • Posts: 2401
    • View Profile
Re: [EXE] OpenXcom Extended
« Reply #642 on: December 12, 2015, 03:18:00 pm »
I push on master possible fix.
But I have bad news, next release (3.0 with scripts) will be incompatible with vs2010 because I move to C++11 with code base.
This will require to upgrading to vs2015 community edition.

Offline Meridian

  • Global Moderator
  • Commander
  • ***
  • Posts: 6604
  • OXCE developer
    • View Profile
    • My Wiki
Re: [EXE] OpenXcom Extended
« Reply #643 on: December 12, 2015, 11:28:16 pm »
It works, thanks!
After updating I also had to add one more file (TrainingState.h/cpp) and then it was OK.

Offline The Reaver of Darkness

  • Commander
  • *****
  • Posts: 1365
    • View Profile
Re: [EXE] OpenXcom Extended
« Reply #644 on: December 13, 2015, 12:25:15 pm »
request: would it be possible to make damaging shots deal 10% of their before armor damage to armor, instead of 10% of their after armor damage?

Example:

In XCom...
Shot deals 80 damage, target has 50 armor, target takes 30 damage and target's armor takes 3 damage.
Shot deals 50 damage, target has 50 armor, target takes no damage and target's armor takes no damage.



What I want...
Shot deals 80 damage, target has 50 armor, target takes 30 damage and target's armor takes 8 damage.
Shot deals 50 damage, target has 50 armor, target takes no damage but target's armor takes 5 damage.