ESOC UHC Plugin documentation & feedback
ESOC UHC Plugin documentation & feedback
The documentation has been moved onto wiki: https://wiki.eso-community.net/ESOC_UHC_Plugin
You may use this thread to report issues with ESOC UHC Plugin functionality or request new syscalls to be added.
You may use this thread to report issues with ESOC UHC Plugin functionality or request new syscalls to be added.
Re: ESOC UHC Plugin documentation & feedback
1. xsArray functions don't work. (Crashes)
2. Malloc doesn't work either. (Crashes)
3. I can't get vectors to be initialized.
For starters you must add AI building repairs:
2. Malloc doesn't work either. (Crashes)
3. I can't get vectors to be initialized.
For starters you must add AI building repairs:
Code: Select all
//repair
void aiTaskUnitRepair(int unitID = -1)
{
repairUnit(unitID);
}
//inside main
UHCSyscall& saiTaskUnitRepair = pluginInfo->RegisterSyscall(GroupAI, SyscallVoid, "aiTaskUnitRepair", aiTaskUnitRepair, 1, "aiTaskUnitRepair: no help.");
pluginInfo->SyscallSetParam(saiTaskUnitRepair, 0, SyscallInteger, &DefParamNum);
TAD AI Reference Guide
"Better to remain silent and be thought a fool than to speak out and remove all doubt." - Abraham Lincoln
"Better to remain silent and be thought a fool than to speak out and remove all doubt." - Abraham Lincoln
Re: ESOC UHC Plugin documentation & feedback
@Panmaster repairUnit is already exported as aiRepairUnit.
I guess you'd have to consult UHC team themselves about the other things, since you're referring to issues in the C++ context. In ESOC UHC Plugin I successfully use regular C++ constructs instead of xsArray, so that is a possible workaround to some extent.
For vectors I think you must use them as input parameters, like in the example given by UHC team:
I guess you'd have to consult UHC team themselves about the other things, since you're referring to issues in the C++ context. In ESOC UHC Plugin I successfully use regular C++ constructs instead of xsArray, so that is a possible workaround to some extent.
For vectors I think you must use them as input parameters, like in the example given by UHC team:
Re: ESOC UHC Plugin documentation & feedback
I don't understand a damn thing going on in this thread.
- Gichtenlord
- Howdah
- Posts: 1437
- Joined: Nov 15, 2015
Re: ESOC UHC Plugin documentation & feedback
Big kiss to the one who can show me how to initialize an array or vector in xs
r]
- musketeer925
- Retired Contributor
- Posts: 2483
- Joined: Mar 28, 2015
- ESO: musketeer925
Re: ESOC UHC Plugin documentation & feedback
Gichtenlord wrote:Big kiss to the one who can show me how to initialize an array or vector in xs
Code: Select all
int array_id = xsArrayCreateInt(length, default_value, "array_name"));
int array_id = xsArrayCreateFloat(length, default_value, "array_name"));
int array_id = xsArrayCreateString(length, "default_value", "array_name"));
xsArraySetString(array_id, index, "this is a string");
xsArrayGetString(array_id, index);
xsArrayGetSize(int array_id);
etc. I've used these in a trigger context on RE, they definitely work there. Not sure what @Panmaster is saying above about them not working or how he was using them -- perhaps UHC has broken them on EP? I doubt it though.
there are also Bool and Vector type arrays
vector creation, not sure if these work:
Re: ESOC UHC Plugin documentation & feedback
Well, if UHC broke them on EP, the AI would literally not work at all, so I assume he is referring to the C++ side of things. Also malloc isn't a syscall at all, so yeah.
@Gichtenlord In XS you can initialize a vector like this:
EZ
@Gichtenlord In XS you can initialize a vector like this:
EZ
- Gichtenlord
- Howdah
- Posts: 1437
- Joined: Nov 15, 2015
Re: ESOC UHC Plugin documentation & feedback
Big kisses to both of you, @EAGLEMUT and @musketeer925 ♥
Im not into rms anymore, but it might be of use in the future
Im not into rms anymore, but it might be of use in the future
r]
Re: ESOC UHC Plugin documentation & feedback
I'd hoped there was something obviously wrong with the UHC array code. I guess not. It must be a deeper problem.
edit:
syscalls::_vector v = { 1.0f,1.0f,1.0f };
Does the repair function cost wood resources?
edit:
syscalls::_vector v = { 1.0f,1.0f,1.0f };
Does the repair function cost wood resources?
TAD AI Reference Guide
"Better to remain silent and be thought a fool than to speak out and remove all doubt." - Abraham Lincoln
"Better to remain silent and be thought a fool than to speak out and remove all doubt." - Abraham Lincoln
Re: ESOC UHC Plugin documentation & feedback
I don't know, I just exported it in case it's useful for someone, didn't actually need it myself. Can you test it?
Re: ESOC UHC Plugin documentation & feedback
Yes. Repair does work the same as for human players, apart from the button being spammed until it got locked in.
edit: this works too
//set HC destination
void aiTaskUnitSetHC(int unitID = -1)
{
setHomeCityGatherUnit(unitID);
}
edit: this works too
//set HC destination
void aiTaskUnitSetHC(int unitID = -1)
{
setHomeCityGatherUnit(unitID);
}
TAD AI Reference Guide
"Better to remain silent and be thought a fool than to speak out and remove all doubt." - Abraham Lincoln
"Better to remain silent and be thought a fool than to speak out and remove all doubt." - Abraham Lincoln
Who is online
Users browsing this forum: No registered users and 1 guest