Potential new patchpach

Forum for technical discussions regarding development. If you have a general suggestion, problem or comment, please use one of the other forums.

Moderator: OpenTTD Developers

KeldorKatarn
Transport Coordinator
Transport Coordinator
Posts: 274
Joined: 13 Apr 2010 21:31

Re: Potential new patchpach

Post by KeldorKatarn »

Should work now:
Attachments
JokerPatchPackII.patch
(449.66 KiB) Downloaded 67 times
KeldorKatarn
Transport Coordinator
Transport Coordinator
Posts: 274
Joined: 13 Apr 2010 21:31

Re: Potential new patchpach

Post by KeldorKatarn »

Updated version including tree growth speed setting, company taxes and desert amount world generation setting.
Attachments
JokerPatchPackII.patch
(469.98 KiB) Downloaded 89 times
vanquishfist
Engineer
Engineer
Posts: 9
Joined: 28 Oct 2014 16:43

Re: Potential new patchpach

Post by vanquishfist »

I am running Ubuntu 14.04 and would like to use this patch. Can someone who has done this (viki2 or maxiecool2) help me compile this so I can run it? I really have no experience compiling patches.

TIA
Alberth
OpenTTD Developer
OpenTTD Developer
Posts: 4763
Joined: 09 Sep 2007 05:03
Location: home

Re: Potential new patchpach

Post by Alberth »

Being a retired OpenTTD developer does not mean I know what I am doing.
moki
Traffic Manager
Traffic Manager
Posts: 131
Joined: 06 Jul 2007 08:48
Location: Wismar, Germany

Re: Potential new patchpach

Post by moki »

This patch pack seems really interesting... sadly, with the latest version, there's still a problem when compiling (using MinGW/msys on win7-64bit).

Compiling a clean r26440 (or any other version) worked fine, so I assume it has to be a problem with the patch .

Here's the error text, if that helps. There also was a lot of "warning: "/*" within comment [-Wcomment]" in various other files. I'm no programmer, but if any more information helps solving the problem, just message me.

Code: Select all

[SRC] Compiling economy.cpp
In file included from xx/trunk/src/ai/../script/api/script_event_types.hpp:17:0,
                 from xx/trunk/src/ai/ai.hpp:15,
                 from xx/trunk/src/economy.cpp:20:
xx/trunk/src/ai/../script/api/script_window.hpp:312:3
: warning: "/*" within comment [-Wcomment]
   /**
 ^
xx/trunk/src/economy.cpp: In function 'Money GetTransportedGoodsIncome(uint, uint, byte, CargoID)':
xx/trunk/src/economy.cpp:1023:58: error: 'exp' was not declared in this scope
  const float exp1 = (1-exp(d*(-max_1v_1vt1-INV_VA)/DECAY1))/(max_1v_1vt2);
                                                          ^
make[1]: *** [economy.o] Error 1
make[1]: Leaving directory `xx/trunk/objs/release'
make: *** [all] Error 1
Wahazar
Tycoon
Tycoon
Posts: 1451
Joined: 18 Jan 2014 18:10

Re: Potential new patchpach

Post by Wahazar »

You need

Code: Select all

#include <cmath>
in economy.cpp,
however please note that this patch uses float operation and therefore is not suitable for multiplayer.

I have different payment patch without float operations, but it need some effort to be finished.
moki
Traffic Manager
Traffic Manager
Posts: 131
Joined: 06 Jul 2007 08:48
Location: Wismar, Germany

Re: Potential new patchpach

Post by moki »

Ah, that's what happens when you're too lazy to read the whole thread right away :oops: Anyway, that fixed it. Thank you.
yatush123
Engineer
Engineer
Posts: 4
Joined: 10 Dec 2014 00:57

Re: Potential new patchpach

Post by yatush123 »

hello,
im new to the forum and trying to patch this using microsoft visual 2008.
i get a fatal error about two files:

d:\games\תיקיה חדשה (2)\src\script\api\script_types.hpp(87) : fatal error C1083: Cannot open include file: 'squirrel.h': No such file or directory
d:\games\תיקיה חדשה (2)\src\widgets\dropdown_type.h(18) : fatal error C1083: Cannot open include file: 'table/strings.h': No such file or directory

what can i do?

tnx
Eddi
Tycoon
Tycoon
Posts: 8272
Joined: 17 Jan 2007 00:14

Re: Potential new patchpach

Post by Eddi »

you need to compile the complete project, not just the OpenTTD subproject.
yatush123
Engineer
Engineer
Posts: 4
Joined: 10 Dec 2014 00:57

Re: Potential new patchpach

Post by yatush123 »

Tnx,
Now it says:

..\src\economy.cpp(1023) : error C3861: 'exp': identifier not found
..\src\economy.cpp(1024) : error C3861: 'exp': identifier not found

suggestions?
moki
Traffic Manager
Traffic Manager
Posts: 131
Joined: 06 Jul 2007 08:48
Location: Wismar, Germany

Re: Potential new patchpach

Post by moki »

As McZapkie helpfully pointed out, you have to add "#include <cmath>" (withouth the "") in economy.cpp near all the other include lines after applying the patch and before compiling... this should probably be mentioned in the first post (or fixed in the patch file), since it seems to be a common problem.
yatush123
Engineer
Engineer
Posts: 4
Joined: 10 Dec 2014 00:57

Re: Potential new patchpach

Post by yatush123 »

Well I did as McZapkie said and added the line so now when its linking it says:

command.obj : error LNK2001: unresolved external symbol "class CommandCost __fastcall CmdRemovePlan(unsigned int,enum DoCommandFlag,unsigned int,unsigned int,char const *)" (?CmdRemovePlan@@YI?AVCommandCost@@IW4DoCommandFlag@@IIPBD@Z)
command.obj : error LNK2001: unresolved external symbol "class CommandCost __fastcall CmdAddPlanLine(unsigned int,enum DoCommandFlag,unsigned int,unsigned int,char const *)" (?CmdAddPlanLine@@YI?AVCommandCost@@IW4DoCommandFlag@@IIPBD@Z)
command.obj : error LNK2001: unresolved external symbol "class CommandCost __fastcall CmdAddPlan(unsigned int,enum DoCommandFlag,unsigned int,unsigned int,char const *)" (?CmdAddPlan@@YI?AVCommandCost@@IW4DoCommandFlag@@IIPBD@Z)
command.obj : error LNK2001: unresolved external symbol "class CommandCost __fastcall CmdRemovePlanLine(unsigned int,enum DoCommandFlag,unsigned int,unsigned int,char const *)" (?CmdRemovePlanLine@@YI?AVCommandCost@@IW4DoCommandFlag@@IIPBD@Z)
command.obj : error LNK2001: unresolved external symbol "class CommandCost __fastcall CmdChangePlanVisibility(unsigned int,enum DoCommandFlag,unsigned int,unsigned int,char const *)" (?CmdChangePlanVisibility@@YI?AVCommandCost@@IW4DoCommandFlag@@IIPBD@Z)
network_command.obj : error LNK2001: unresolved external symbol "void __fastcall CcAddPlan(class CommandCost const &,unsigned int,unsigned int,unsigned int)" (?CcAddPlan@@YIXABVCommandCost@@III@Z)
viewport.obj : error LNK2001: unresolved external symbol "struct Pool _plan_pool" (?_plan_pool@@3U?$Pool@UPlan@@G$0BA@$0PKAA@$00$0A@$00@@A)
viewport.obj : error LNK2001: unresolved external symbol "struct Plan * _current_plan" (?_current_plan@@3PAUPlan@@A)
toolbar_gui.obj : error LNK2001: unresolved external symbol "void __fastcall ShowPlansWindow(void)" (?ShowPlansWindow@@YIXXZ)
saveload.obj : error LNK2001: unresolved external symbol "struct ChunkHandler const * const _plan_chunk_handlers" (?_plan_chunk_handlers@@3QBUChunkHandler@@B)
..\objs\Win32\Release\\openttd.exe : fatal error LNK1120: 10 unresolved externals

what am i missing?
Eddi
Tycoon
Tycoon
Posts: 8272
Joined: 17 Jan 2007 00:14

Re: Potential new patchpach

Post by Eddi »

try running projects/generate.vbs
yatush123
Engineer
Engineer
Posts: 4
Joined: 10 Dec 2014 00:57

Re: Potential new patchpach

Post by yatush123 »

Yep that did it!!!!
tnx :bow:
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: No registered users and 41 guests