Coder Social home page Coder Social logo

egomeh / anno1800-scripting-api Goto Github PK

View Code? Open in Web Editor NEW
19.0 19.0 7.0 4.38 MB

A tool to make scripts for Anno 1800

License: MIT License

C# 0.03% C++ 21.90% C 77.05% Assembly 0.02% Objective-C 0.12% Objective-C++ 0.62% Shell 0.01% GLSL 0.01% CMake 0.02% Kotlin 0.01% Makefile 0.16% Batchfile 0.06% HTML 0.01% GDB 0.01%

anno1800-scripting-api's People

Contributors

brumiros avatar camillehbp avatar egomeh avatar seynax avatar

Stargazers

 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

anno1800-scripting-api's Issues

API doesn't seem to find all islands or can't determine their name

The API doesn't seem to find all islands the player owns, or all islands in general (by adding a method for that).

OR THEN, the API doesn't seem to be able to correctly determine the names of the islands, sometimes the error "[The name cannot be that long...]" seems to be thrown, but most of the time no error is sent, I checked the problem should start from here:

wchar_t* stringLocation = (wchar_t*)(address);
(knowing that according to my logs, the "IsLong" condition has never been met for me, yet).

It almost looks like (wchar_t*)(address); returns nothing, which makes wchar_t* stringLocation unusable.

What does the .exe file in releases do?

You have a .exe file in releases, the first and only one, and there is some talk about making it more user-friendly.

What exactly does, or well, is the .exe file supposed to do? From the description of the release, it can seem like a helper program to the script, and not the script itself?

I tried running it, seems to hook up to the game, but nothing happens. Does the script support moving resources between worlds btw?

Impossible to use for someone not versed in the code

Hello!

I would like to understand how to use and contribute to this program, but it's impossible for me to understand how to build and use this. I've built something called GoodMinMax and Monocle but they all crash the game.

Would you be willing to setup a call, maybe on Jitsi, if you don't have the time to write all this? Otherwise just some quick info here on Github would already be nice.

I could afterwards take a few screenshots, write down my process, and make some kind of tutorial for those interested.

As of now, I think the project is unusable to anyone but you and the other contributors. It's a shame because it looks like a very nice project in which a lot of effort has been put. It's sad that it is missing only a little bit of doc to get the community to help you and try it on their own.

On extractring demand data

Do you have any advice on how to extract trade information from the game for modding purposes? I am trying to create a system for controlling trade externally but the first step is that I need to extract the trade routes that are currently active and what they are shipping. After I unpacked the game RDAs I notice that the XML is effectively unreadable as the goods and ammounts and such seem to be just raw hex identifiers.

If you have any advice on parsing these / a table for converting the names of goods to their hex codes I'd very much appreciate it! My exact context is I'm trying to generate network graphs of a players trade network from save games.

[Question] Useable as a mod and more options than lua?

Hi :)
thank you for your work, it looks interesting.

Unfortunately I'm no programmer, so understanding anything from your work by looking at the code is not possible for me :D

But I'm currently "fighting" with lua scripts from Anno 1800 and every day hating the devs that they only exposed so incomplete stuff to lua ( 1) there is setPosition, but no getPosition. 2) I see no way to add/read out ObjectLabels that could be used to mark objects for usage in xml triggers Objectfilter, 3) there is no way to change owner of any object, just of selected, 4) no clue if it is possible to spawn an object in lua, there is a debugspawnobject, but no clue what arguments it expects ... and many many more missing important features).

So I wondered if there really is no better way to write nice scripts for Anno, than to struggle with this incomplete mess of lua :D
But it should be properly usable as a mod. So asking the user to install a separate program and to run it next to Anno is no option.
..
How does your project work? Would the things I listed above be possible with your scripting api in theory?
Would it somehow be possible to install it as a mod, at best with mod.io subscribe feature? Or at least with asking the users to put a custom dll into the games folder, like we did in the past with the modloader?

Btw. Taube lately found out how to calculate AreaIDs and OIDs from the SessionID,AreaIndex,IslandID,ObjectID. Not sure if you also needs such things in your scripting API or if you already knew how to do this.

API Insights

How did you obtain all the function offsets in TomCruise/dllmain.cpp : ComputeFunctionOffsets?
Would it be possible to extract more game statistics (e.g. number of factories on island, ship unload statistics - as displayed in the storage tab)?

The program gets stuck at acceptedSocket.Wait(); (Telegraph.gen.cs#L63) and blockages related to the game update

Hello,

The program gets stuck at acceptedSocket.Wait(); (Telegraph.gen.cs#L63)

I tested your API by running the TestMonocle source code, but it doesn't work.
The program gets stuck at acceptedSocket.Wait();

acceptedSocket.Wait();

Problem with local IP address

I also got something that looks strange to me, the address returned by IPAddress "ipAddress = ipHostInfo.AddressList[0];"

IPAddress ipAddress = ipHostInfo.AddressList[0];
is ":::1", if I replace the line with "ipAddress = ipHostInfo. AddressList[1]", I get my local ip address as "000.0.0.0"

Thanks in advance,
Have a good day

Stand alone version

Hello, is it possible to release an .exe version of this? I really want to use this, but I don't know how to get it to run.

Thanks in advance

Cannot get monocle to run

Hello,
I am very interested by this API & I would like to use it.
I followed the steps described in the readme but I'm having trouble to make it work.
More specifically:

  • Launch the solution (still in debug mode) : The only runnable project in this solution is SurvellianceVan so I set it as the project to run. I looked at the code & it appeared to me that it creates a server and waits for clients
  • Run code using the monocle project : When I run monocle, I get a bug at the line with the m_Socket.Connect in the Telegraph constructor. I tried changing the port to match the one indicated in SurvellianceVan without any success.

Can you please give more details on how to use it ?
Best regards.

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.